I don't know where to add this, either help me and explain why or don't post at all..
Code:
for (int i : Config.UNSPAWNABLE_ITEMS) {
if (i == newItemID) {
c.sendMessage("This item is unspawnable.");
return;
Where does that go into this?
Code:
if (playerCommand.startsWith("item")) {
if (c.inWild())
return;
try {
String[] args = playerCommand.split(" ");
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if ((newItemID <= 20500) && (newItemID >= 0)) {
c.getItems().addItem(newItemID, newItemAmount);
} else {
c.sendMessage("That item ID does not exist.");
}
} else {
c.sendMessage("Wrong usage: (Ex:(::pickup_ID_Amount)(::item 995 1))");
}
} catch(Exception e) {
}
}
Thanks in advance, and i do already have the unspawnables in the config.. i just get compile errors when i put in that part of the code (up top)