Skip to content

Commit

Permalink
Merge pull request #3084 from Multiverse/ben/fix-getTo-null
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 authored Aug 13, 2024
2 parents 2cf8b69 + 006fe56 commit 2d059ea
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ public void playerTeleport(PlayerTeleportEvent event) {
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());
Expand Down Expand Up @@ -284,6 +288,7 @@ public void playerPortal(PlayerPortalEvent event) {
}
// 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());
Expand Down

0 comments on commit 2d059ea

Please sign in to comment.