diff --git a/src/main/java/com/Acrobot/ChestShop/ChestShop.java b/src/main/java/com/Acrobot/ChestShop/ChestShop.java index 2736e4c..f620485 100644 --- a/src/main/java/com/Acrobot/ChestShop/ChestShop.java +++ b/src/main/java/com/Acrobot/ChestShop/ChestShop.java @@ -181,7 +181,6 @@ public class ChestShop extends JavaPlugin { registerEvent(new ChestBreak()); registerEvent(new BlockPlace()); - registerEvent(new ItemMoveListener()); registerEvent(new PlayerConnect()); registerEvent(new PlayerInteract()); registerEvent(new PlayerInventory()); @@ -191,6 +190,10 @@ public class ChestShop extends JavaPlugin { registerEvent(new RestrictedSign()); registerEvent(new ShortNameSaver()); + + if (!Properties.TURN_OFF_HOPPER_PROTECTION) { + registerEvent(new ItemMoveListener()); + } } private void registerShopRemovalEvents() { diff --git a/src/main/java/com/Acrobot/ChestShop/Configuration/Properties.java b/src/main/java/com/Acrobot/ChestShop/Configuration/Properties.java index cfa5a22..2b5d8e0 100644 --- a/src/main/java/com/Acrobot/ChestShop/Configuration/Properties.java +++ b/src/main/java/com/Acrobot/ChestShop/Configuration/Properties.java @@ -114,6 +114,9 @@ public class Properties { @ConfigurationComment("Do you want to turn off the default sign protection? Warning! Other players will be able to destroy other people's shops!") public static boolean TURN_OFF_SIGN_PROTECTION = false; + @ConfigurationComment("Do you want to disable the hopper protection, which prevents the hoppers from taking items out of chests?") + public static boolean TURN_OFF_HOPPER_PROTECTION = false; + @ConfigurationComment("Do you want to protect shop chests with LWC?") public static boolean PROTECT_CHEST_WITH_LWC = false;