From 81e1d0f945a85766c05bd2b7780b2a1d5de6e542 Mon Sep 17 00:00:00 2001 From: LegameMc Date: Sun, 21 Mar 2021 13:26:42 +0800 Subject: [PATCH] Hopper Event Check if the event is cancelled by other plugin such as ChestShop, QuickShop, etc --- .../jamesdpeters/minecraft/chests/listeners/HopperListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/listeners/HopperListener.java b/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/listeners/HopperListener.java index 9285341..44df0e3 100644 --- a/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/listeners/HopperListener.java +++ b/ChestsPlusPlus_Main/src/main/java/com/jamesdpeters/minecraft/chests/listeners/HopperListener.java @@ -35,6 +35,8 @@ public class HopperListener implements Listener { //TO HOPPER if(event.getDestination().getHolder() instanceof Hopper){ if(event.getDestination().getLocation() != null){ + // If the event is cancelled by other plugin + if(event.isCancelled()) return; if(event.getDestination().getLocation().getBlock().isBlockPowered()) return; } event.setCancelled(!HopperFilter.isInFilter(event.getDestination().getLocation().getBlock(),event.getItem()));