This is what Eclipse shows as error:
Code:
if (playerCommand.startsWith("sellitem")) {
try {
String[] args = playerCommand.split(" ");
if (!args[1] == Config.ALLOWED_SELLITEMS.length) {
c.sendMessage("You're not allowed to sell this item");
return;
}
c.getItems().deleteItem(args[1], 1);
c.getItems().addItem(995, Config.ALLOWED_SELLITEMS[1]);
c.sendMessage("You sell the item for " +Config.ALLOWED_SELLITEMS[1] + " coins.");
} catch(Exception e) {
}
}
Can anyone please help me fixing the command? I can't come out of it.
Rep and thanks will be given.
- Brighter