diff --git a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java index e025aa95..0dbe76a3 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java @@ -169,6 +169,10 @@ public class MVPlayerListener implements Listener { if (event.isCancelled()) { return; } + if (event.getTo() == null) { + Logging.fine("Player '" + event.getPlayer().getName() + "' is teleporting to a null location!"); + return; + } Player teleportee = event.getPlayer(); CommandSender teleporter = teleportee; String teleporterName = MultiverseCore.getPlayerTeleporter(teleportee.getName()); @@ -284,6 +288,7 @@ public class MVPlayerListener implements Listener { } // The adjust should have happened much earlier. if (event.getTo() == null) { + Logging.fine("Player '" + event.getPlayer().getName() + "' is portaling to NULL location."); return; } MultiverseWorld fromWorld = this.worldManager.getMVWorld(event.getFrom().getWorld().getName());