From 1e701f01f61f860b72705d3d840322ec6eba47c2 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 17 Dec 2012 21:55:00 +0100 Subject: [PATCH] Bind spawn-egg dupe-prevention to the items check to allow turning it off. --- .../nocheatplus/checks/inventory/InventoryListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java index e398b4df..966aaffc 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java @@ -288,7 +288,7 @@ public class InventoryListener extends CheckListener { final Player player = event.getPlayer(); if (player.getGameMode() == GameMode.CREATIVE) return; 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); } }