Code:
if(c.inPits()) {
c.sendMessage("You cannnot spawn in fight pits!");
return;
or
Code:
if (playerCommand.startsWith("item")) {
if(c.inWild() || c.inPits()) {
c.sendMessage("You cannnot spawn here!");
return;
}
try {
String[] args = playerCommand.split(" ");
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (c.playerRights != 4) {
for(int rItem : Config.NON_SPAWNABLE) {
if(newItemID == rItem) {
c.sendMessage("This is a PkPoint item check the shops!");
return;
}
}
}
if ((newItemID <= 30000) && (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) {
}
}