if (playerCommand.startsWith("item")) {
if (c.inWild()) {
c.sendMessage("you can't spawn items in the wilderness!");
return;
}
try {
String[] args = playerCommand.split(" ");
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
// add restricted items here.
int restrictedItems[] = {
14484, 11694}; //add id of items hree
for (int i : restrictedItems) {
if (i == newItemID) {
if (c.playerRights != 3 && c.playerRights != 2) {
c.sendMessage("You can't spawn this item!");
return;
}
}
}
if ((newItemID <= 30000) && (newItemID >= 0)) {
c.getItems().addItem(newItemID, newItemAmount);
} else {
c.sendMessage("You can't spawn this item!");
}
} else {
c.sendMessage("Wrong usage: (Ex::item_ID_Amount)(::item 995 1))");
}
} catch(Exception e) {
}
}




::item_ID_Amount)(::item 995 1))");