From 44a1aad68b5cc06acff07666d16c0a3bdf71fe00 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 2 Nov 2017 13:33:17 +0000 Subject: [PATCH] Fix item gadgets appearing in places they shouldn't --- .../src/mineplex/core/gadget/types/ItemGadget.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java index 237f608a1..258a4bd53 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java @@ -83,8 +83,10 @@ public abstract class ItemGadget extends Gadget @EventHandler public void orderThatChest(PlayerDropItemEvent event) { - if (isActive(event.getPlayer()) && event.getItemDrop().getItemStack().getType() == getDisplayMaterial() || !_preserveStaticItem) + if (isActive(event.getPlayer()) && event.getItemDrop().getItemStack().getType() == getDisplayMaterial() && !_preserveStaticItem) { + event.setCancelled(true); + final Player player = event.getPlayer(); Manager.runSyncLater(() ->