From 24ff27b408ea3dd94fdc244d02591f900080e7f6 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sat, 14 Dec 2013 17:23:34 -0600 Subject: [PATCH] Don't try to teleport to a null world. Fixes BUKKIT-5145 --- src/main/java/net/minecraft/server/Entity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index fec07f8637..dc0abc5974 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -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();