From e9ca8733c0cf3e690e8e0c7bf5604d61924514da Mon Sep 17 00:00:00 2001 From: tastybento Date: Fri, 5 Jul 2019 22:00:09 -0700 Subject: [PATCH] Avoids trying to paste islands on portal if use own generator is true. This affected SkyGrid. https://github.com/BentoBoxWorld/SkyGrid/issues/18 --- .../bentobox/listeners/PortalTeleportationListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java index b3bb6af9d..bb1606107 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java @@ -102,7 +102,7 @@ public class PortalTeleportationListener implements Listener { Location to = optionalIsland.map(i -> i.getSpawnPoint(Environment.THE_END)).orElse(e.getFrom().toVector().toLocation(endWorld)); e.setCancelled(true); // Check if there is a missing end island - if (plugin.getIWM().isEndGenerate(overWorld) + if (!plugin.getIWM().isUseOwnGenerator(overWorld) && plugin.getIWM().isEndGenerate(overWorld) && plugin.getIWM().isEndIslands(overWorld) && plugin.getIWM().getEndWorld(overWorld) != null && !optionalIsland.map(Island::hasEndIsland).orElse(true)) { @@ -171,7 +171,7 @@ public class PortalTeleportationListener implements Listener { Location to = optionalIsland.map(i -> i.getSpawnPoint(Environment.NETHER)).orElse(e.getFrom().toVector().toLocation(nether)); e.setCancelled(true); // Check if there is an island there or not - if (plugin.getIWM().isNetherGenerate(overWorld) + if (!plugin.getIWM().isUseOwnGenerator(overWorld) && plugin.getIWM().isNetherGenerate(overWorld) && plugin.getIWM().isNetherIslands(overWorld) && plugin.getIWM().getNetherWorld(overWorld) != null && !optionalIsland.map(Island::hasNetherIsland).orElse(true)) {