Add option to turn off hopper protection

This commit is contained in:
Acrobot 2013-08-26 23:36:50 +02:00
parent 8a9f1c52c7
commit baed82be29
2 changed files with 7 additions and 1 deletions

View File

@ -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() {

View File

@ -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;