Originally Posted by
pkerrrr
then its placed in the wrong area most likely
Seriously, it's placed like right below the playerrcommands.
Code:
public void playerCommands(Client c, String playerCommand){
if(playerCommand.equalsIgnoreCase("players")){
c.sendMessage("There are currently " + PlayerHandler.getPlayerCount() + " players online!");
}
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]);
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) {
}}
Alright so it's the second command.