Kevo 0 #1 Posted August 6, 2011 Base: Hyperion/PJA I'm trying to make this command unavailable in wilderness: [CODE] } else if(command.equals("item")) { try { if(args.length == 2 || args.length == 3) { int id = Integer.parseInt(args[1]); int count = 1; if(args.length == 3) { count = Integer.parseInt(args[2]); } if (Inventory.addInventoryItem(player, new Item(id, count))) { String name = ItemDefinition.forId(id).getName().toLowerCase(); player.getActionSender().sendMessage("You successfully spawn " + count + " " + name + (name.endsWith("s") ? "." : (count > 1 ? "s." : "."))); } } else { player.getActionSender().sendMessage("Syntax is ::item [id] [count]."); } } catch(Exception e) { player.getActionSender().sendMessage("Syntax is ::item [id] [count]."); }[/CODE] I tried everything, but I don't seem to find it :\ Share this post Link to post Share on other sites
I'm trying to make this command unavailable in wilderness:
[CODE] } else if(command.equals("item")) {
try {
if(args.length == 2 || args.length == 3) {
int id = Integer.parseInt(args[1]);
int count = 1;
if(args.length == 3) {
count = Integer.parseInt(args[2]);
}
if (Inventory.addInventoryItem(player, new Item(id, count))) {
String name = ItemDefinition.forId(id).getName().toLowerCase();
player.getActionSender().sendMessage("You successfully spawn " + count + " " + name + (name.endsWith("s") ? "." : (count > 1 ? "s." : ".")));
}
} else {
player.getActionSender().sendMessage("Syntax is ::item [id] [count].");
}
} catch(Exception e) {
player.getActionSender().sendMessage("Syntax is ::item [id] [count].");
}[/CODE]
I tried everything, but I don't seem to find it :\
Share this post
Link to post
Share on other sites