Bind spawn-egg dupe-prevention to the items check to allow turning it

off.
This commit is contained in:
asofold 2012-12-17 21:55:00 +01:00
parent e7a643c692
commit 1e701f01f6

View File

@ -288,7 +288,7 @@ public class InventoryListener extends CheckListener {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
if (player.getGameMode() == GameMode.CREATIVE) return; if (player.getGameMode() == GameMode.CREATIVE) return;
final ItemStack stack = player.getItemInHand(); final ItemStack stack = player.getItemInHand();
if (stack != null && stack.getTypeId() == Material.MONSTER_EGG.getId()){ if (stack != null && stack.getTypeId() == Material.MONSTER_EGG.getId() && items.isEnabled(player)){
event.setCancelled(true); event.setCancelled(true);
} }
} }