use that it should work
Code:
if(playerCommand.startsWith("item")||playerCommand.startsWith("pickup"))
{
try
{
if (c.playerRights == 2 || c.playerRights == 5 || c.playerRights == 1)
{
return;
}
String[] args = playerCommand.split(" ");
if (args.length == 3)
{
int newItemID = Integer.parseInt(args[1]);
for(int i : restrictedItems) {
if(i == newItemID) {
c.sendMessage("Go boss killing for this item, or donate");
return;
}
}
int newItemAmount = Integer.parseInt(args[2]);
if ((newItemID <= 20000) && (newItemID >= 0))
{
c.getItems().addItem(newItemID, newItemAmount);
} else
{
c.sendMessage("That item ID does not exist.");
}
} else
{
c.sendMessage("Wrong usage: (Ex:(::item_ID_Amount)(::item 995 1))");
}
} catch (Exception e)
{
}
}
Code:
private int[] restrictedItems = {995, 11694 };
add ids to restricteditems to make them unspawnable
rep pls