Jump to content
  • 0
Sign in to follow this  
Kevo

[Hyperion] Disabling a command in wilderness

Question

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

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Sign in to follow this  

×