summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-03-08 19:24:43 -0500
committerEvilSeph <evilseph@gmail.com>2012-03-08 19:31:10 -0500
commitf26fbc3bf306aa171ec7fa629ac7d7031528bd62 (patch)
tree6fda655b8c2fae8d8dd267a83b86419d196c3137 /src/main/java/net
parent8ecdfe9eed943ced234f98dc2813b11d9099fd4d (diff)
downloadcraftbukkit-f26fbc3bf306aa171ec7fa629ac7d7031528bd62.tar
craftbukkit-f26fbc3bf306aa171ec7fa629ac7d7031528bd62.tar.gz
craftbukkit-f26fbc3bf306aa171ec7fa629ac7d7031528bd62.tar.lz
craftbukkit-f26fbc3bf306aa171ec7fa629ac7d7031528bd62.tar.xz
craftbukkit-f26fbc3bf306aa171ec7fa629ac7d7031528bd62.zip
Fixed EnderPearls not being limited to the world they were used in. Fixes BUKKIT-658
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderPearl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index 57b4e2f3..484f326e 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -36,7 +36,7 @@ public class EntityEnderPearl extends EntityProjectile {
if (this.shooter != null) {
if (this.shooter instanceof EntityPlayer) {
CraftPlayer player = (CraftPlayer) this.shooter.bukkitEntity;
- teleport = player.isOnline();
+ teleport = player.isOnline() && player.getWorld() == getBukkitEntity().getWorld();
if (teleport) {
teleEvent = new PlayerTeleportEvent(player, player.getLocation(), getBukkitEntity().getLocation(), PlayerTeleportEvent.TeleportCause.ENDER_PEARL);