Added disabled worlds.

This commit is contained in:
Fernando Pettinelli 2021-03-20 11:49:11 -03:00 committed by Brianna
parent 079095c073
commit 3a73ba8dd8
2 changed files with 8 additions and 0 deletions

View File

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

View File

@ -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?");