mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 02:25:41 +01:00
Merge pull request #3084 from Multiverse/ben/fix-getTo-null
This commit is contained in:
commit
2d059eabc3
@ -169,6 +169,10 @@ public class MVPlayerListener implements Listener {
|
|||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (event.getTo() == null) {
|
||||||
|
Logging.fine("Player '" + event.getPlayer().getName() + "' is teleporting to a null location!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Player teleportee = event.getPlayer();
|
Player teleportee = event.getPlayer();
|
||||||
CommandSender teleporter = teleportee;
|
CommandSender teleporter = teleportee;
|
||||||
String teleporterName = MultiverseCore.getPlayerTeleporter(teleportee.getName());
|
String teleporterName = MultiverseCore.getPlayerTeleporter(teleportee.getName());
|
||||||
@ -284,6 +288,7 @@ public class MVPlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
// The adjust should have happened much earlier.
|
// The adjust should have happened much earlier.
|
||||||
if (event.getTo() == null) {
|
if (event.getTo() == null) {
|
||||||
|
Logging.fine("Player '" + event.getPlayer().getName() + "' is portaling to NULL location.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MultiverseWorld fromWorld = this.worldManager.getMVWorld(event.getFrom().getWorld().getName());
|
MultiverseWorld fromWorld = this.worldManager.getMVWorld(event.getFrom().getWorld().getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user