diff --git a/src/main/java/com/songoda/epichoppers/listeners/BlockListeners.java b/src/main/java/com/songoda/epichoppers/listeners/BlockListeners.java index bdac91d..90b24bc 100644 --- a/src/main/java/com/songoda/epichoppers/listeners/BlockListeners.java +++ b/src/main/java/com/songoda/epichoppers/listeners/BlockListeners.java @@ -36,6 +36,9 @@ public class BlockListeners implements Listener { if (e.getBlock().getType() != Material.HOPPER) return; + if (Settings.DISABLED_WORLDS.getStringList().contains(player.getWorld().getName())) + return; + int amt = count(e.getBlock().getChunk()); int max = maxHoppers(player); diff --git a/src/main/java/com/songoda/epichoppers/settings/Settings.java b/src/main/java/com/songoda/epichoppers/settings/Settings.java index 22dce58..f6d6fac 100644 --- a/src/main/java/com/songoda/epichoppers/settings/Settings.java +++ b/src/main/java/com/songoda/epichoppers/settings/Settings.java @@ -25,6 +25,11 @@ public class Settings { public static final ConfigSetting ALLOW_NORMAL_HOPPERS = new ConfigSetting(config, "Main.Allow Normal Hoppers", false, "Should natural hoppers not be epic hoppers?"); + public static final ConfigSetting DISABLED_WORLDS = new ConfigSetting(config, "Main.Disabled Worlds", + Arrays.asList("example1", "example2"), + "Worlds where epic hoppers cannot be placed.", + "Any placed Epic Hopper will just be converted to a normal one."); + public static final ConfigSetting TELEPORT = new ConfigSetting(config, "Main.Allow Players To Teleport Through Hoppers", true, "Should players be able to teleport through hoppers?");