mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
Don't try to teleport to a null world. Fixes BUKKIT-5145
This commit is contained in:
parent
a565486ee1
commit
24ff27b408
1 changed files with 1 additions and 1 deletions
|
@ -1765,7 +1765,7 @@ public abstract class Entity {
|
|||
EntityPortalEvent event = new EntityPortalEvent(this.getBukkitEntity(), enter, exit, agent);
|
||||
event.useTravelAgent(useTravelAgent);
|
||||
event.getEntity().getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() || event.getTo() == null || !this.isAlive()) {
|
||||
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) {
|
||||
return;
|
||||
}
|
||||
exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
|
||||
|
|
Loading…
Reference in a new issue