diff --git a/src/main/java/com/onarandombox/MultiversePortals/MultiversePortals.java b/src/main/java/com/onarandombox/MultiversePortals/MultiversePortals.java index c71e3a0..4e6b2d2 100644 --- a/src/main/java/com/onarandombox/MultiversePortals/MultiversePortals.java +++ b/src/main/java/com/onarandombox/MultiversePortals/MultiversePortals.java @@ -89,6 +89,7 @@ public class MultiversePortals extends JavaPlugin implements MVPlugin { private long portalCooldown = 0; private final static int requiresProtocol = 24; public static boolean UseOnMove = true; + public static boolean bucketFilling = true; public static boolean EnforcePortalAccess = true; public static boolean WandEnabled = true; public static boolean ClearOnRemove = false; @@ -275,12 +276,14 @@ public void loadConfig() { this.MVPConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml")); MultiversePortals.UseOnMove = this.MVPConfig.getBoolean("useonmove", true); + MultiversePortals.bucketFilling = this.MVPConfig.getBoolean("bucketfilling", true); MultiversePortals.EnforcePortalAccess = this.MVPConfig.getBoolean("enforceportalaccess", true); this.portalCooldown = this.MVPConfig.getInt("portalcooldown", 1000); MultiversePortals.ClearOnRemove = this.MVPConfig.getBoolean("clearonremove", false); MultiversePortals.TeleportVehicles = this.MVPConfig.getBoolean("teleportvehicles", true); MultiversePortals.NetherAnimation = this.MVPConfig.getBoolean("netheranimation", true); MultiversePortals.FrameMaterials = migrateFrameMaterials(this.MVPConfig); + // Migrate useportalaccess -> enforceportalaccess if (this.MVPConfig.get("useportalaccess") != null) { this.MVPConfig.set("enforceportalaccess", this.MVPConfig.getBoolean("useportalaccess", true)); @@ -519,6 +522,7 @@ public String getVersionInfo() { + "[Multiverse-Portals] Dumping Portal Values: (version " + this.getMainConfig().getDouble("version", -1) + ')' + '\n' + "[Multiverse-Portals] wand: " + this.getMainConfig().get("wand", "NOT SET") + '\n' + "[Multiverse-Portals] useonmove: " + this.getMainConfig().get("useonmove", "NOT SET") + '\n' + + "[Multiverse-Portals] bucketfilling: " + this.getMainConfig().get("bucketfilling", "NOT SET") + '\n' + "[Multiverse-Portals] portalsdefaulttonether: " + this.getMainConfig().get("portalsdefaulttonether", "NOT SET") + '\n' + "[Multiverse-Portals] enforceportalaccess: " + this.getMainConfig().get("enforceportalaccess", "NOT SET") + '\n' + "[Multiverse-Portals] portalcooldown: " + this.getMainConfig().get("portalcooldown", "NOT SET") + '\n' diff --git a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java index 00824e4..5b336ba 100644 --- a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java +++ b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java @@ -101,6 +101,11 @@ public void playerBucketEmpty(PlayerBucketEmptyEvent event) { return; } + if (!MultiversePortals.bucketFilling) { + Logging.fine("The bucket filling functionality has been disabled in config, doing nothing"); + return; + } + Location translatedLocation = this.getTranslatedLocation(event.getBlockClicked(), event.getBlockFace()); Logging.finer("Fill: "); Logging.finer("Block Clicked: " + event.getBlockClicked() + ":" + event.getBlockClicked().getType()); diff --git a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java index 82c1930..8818714 100644 --- a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java +++ b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java @@ -57,8 +57,8 @@ public void blockFromTo(BlockFromToEvent event) { event.setCancelled(true); return; } - // If something is trying to flow out, stop that too. - if (plugin.getPortalManager().isPortal(event.getBlock().getLocation())) { + // If something is trying to flow out, stop that too, unless bucketFilling has been disabled + if (plugin.getPortalManager().isPortal(event.getBlock().getLocation()) && MultiversePortals.bucketFilling) { event.setCancelled(true); } } diff --git a/src/main/resources/defaults/config.yml b/src/main/resources/defaults/config.yml index 8a7c34e..fd7bd4c 100644 --- a/src/main/resources/defaults/config.yml +++ b/src/main/resources/defaults/config.yml @@ -7,6 +7,7 @@ wand: 271 useonmove: true +bucketfilling: true portalsdefaulttonether: false enforceportalaccess: true portalcooldown: 1000