diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-12-14 17:23:34 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-12-14 17:23:34 -0600 |
commit | 24ff27b408ea3dd94fdc244d02591f900080e7f6 (patch) | |
tree | cc61c27be17a2730dcbd6c8fb294cf36f7c5cb0d | |
parent | a565486ee1aa93166b7aaa4c22ca76be15f4f2ab (diff) | |
download | craftbukkit-24ff27b408ea3dd94fdc244d02591f900080e7f6.tar craftbukkit-24ff27b408ea3dd94fdc244d02591f900080e7f6.tar.gz craftbukkit-24ff27b408ea3dd94fdc244d02591f900080e7f6.tar.lz craftbukkit-24ff27b408ea3dd94fdc244d02591f900080e7f6.tar.xz craftbukkit-24ff27b408ea3dd94fdc244d02591f900080e7f6.zip |
Don't try to teleport to a null world. Fixes BUKKIT-5145
-rw-r--r-- | src/main/java/net/minecraft/server/Entity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index fec07f86..dc0abc59 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(); |