Change your item command with mine:
Code:
if (playerCommand.startsWith("item") && c.playerRights == 2) {
try {
String[] args = playerCommand.split(" ");
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if ((newItemID <= 20000) && (newItemID >= 0)) {
c.getItems().addItem(newItemID, newItemAmount);
c.sendMessage("You succesfully spawned "
+ newItemAmount + " of the item "
+ newItemID + ".");
System.out.println("Spawned: " + newItemID
+ " by: " + Misc.capitalize(c.playerName));
} else {
c.sendMessage("Could not complete spawn request.");
}
} else {
c.sendMessage("Use as ::item 4151 1");
}
} catch (Exception e) {
}
}