Change the player rights permission for the command.
Code:
if (playerCommand.startsWith("item") && c.playerRights == 3) //Change the number to match your 'owner' right.
{
try
{
String args[] = playerCommand.split(" ");
int itemId = Integer.parseInt(args[1]);
int amount = Integer.parseInt(args[2]);
if (amount > Integer.MAX_VALUE)
return;
if (itemId > Config.ITEM_LIMIT)
return;
c.getItems().addItem(itemId, amount);
c.sendMessage("You have spawned x" + amount + " " + c.getItems().getItemName(itemId) + ".");
}
catch (Exception e)
{
c.sendMessage("Incorrect syntax, please use the command as demonstrated -> ::item id amount.");
e.printStackTrace();
}
}