This first part isn't basically a dupe fix, it's so people cannot spawn coins, or nulls. (fixing nulling in combat)
in your item command add this somewhere you feel confortable.
Code:
int playerGold = Engine.playerItems.invItemCount(p, 995);
String itemName = Engine.items.getItemName(itemID);
String[] spawnDisabled = {"null", "Coins", "(h", "/10", "100", "75", "50", "25"};
for (String s : spawnDisabled) {
if (itemName.contains(s)) {
p.getActionSender().sendMessage(p, "This item cannot be spawned.");
p.getActionSender().addSoundEffect(p, 4039, 1, 0, 0);
return;
}
}
You can change the items also.
--------------------------------------
The 2nd dupe!
in your item command, search for:
Code:
return; //Wierd bug fix
and under that add this!
Code:
}
if (itemAmount > 2000) {
p.getActionSender().sendMessage(p, "You can only spawn 2000 at a time.");
return;
Also to fix nulling in combat do this under ^ return;
Code:
}
if (itemID > 14606) {
p.getActionSender().sendMessage(p, "You are really that much of a bum?");
return;
That will make it so they cannot spawn anything over the item list which is a "null", lol.
Hope you like, have fun.