From 2257ac2f71b7cf038a0d1f5f01b360eccdaacda6 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 25 Jul 2014 15:22:01 +0200 Subject: [PATCH] Add exception for MILK_BUCKET. --- .../nocheatplus/checks/inventory/InventoryListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java index 838b6c33..92fa67f8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java @@ -224,7 +224,6 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen boolean resetAll = false; - if (event.hasItem()){ final ItemStack item = event.getItem(); final Material type = item.getType(); @@ -234,7 +233,7 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen // It was a bow, the player starts to pull the string, remember this time. data.instantBowInteract = (data.instantBowInteract > 0 && now - data.instantBowInteract < 800) ? Math.min(System.currentTimeMillis(), data.instantBowInteract) : System.currentTimeMillis(); } - else if (type.isEdible() || type == Material.POTION) { + else if (type.isEdible() || type == Material.POTION || type == Material.MILK_BUCKET) { final long now = System.currentTimeMillis(); // It was food, the player starts to eat some food, remember this time and the type of food. data.instantEatFood = type;