diff --git a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java index d0e55998d..26e707215 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java @@ -155,7 +155,7 @@ public class PortalTeleportationListener implements Listener { private boolean processPortal(final PlayerEntityPortalEvent e, final Environment env) { World fromWorld = e.getFrom().getWorld(); World overWorld = Util.getWorld(fromWorld); - if (fromWorld == null || !plugin.getIWM().inWorld(overWorld)) { + if (overWorld == null || fromWorld == null || !plugin.getIWM().inWorld(overWorld)) { // Do nothing special return false; }