diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityTrackerEntry.java | 6 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java index c504d35f..d735e8e0 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -234,12 +234,14 @@ public class EntityTrackerEntry { if (d0 >= (double) (-this.b) && d0 <= (double) this.b && d1 >= (double) (-this.b) && d1 <= (double) this.b) { if (!this.trackedPlayers.contains(entityplayer) && this.d(entityplayer)) { // CraftBukkit start - if (tracker instanceof EntityPlayer) { - Player player = ((EntityPlayer) tracker).getBukkitEntity(); + if (this.tracker instanceof EntityPlayer) { + Player player = ((EntityPlayer) this.tracker).getBukkitEntity(); if (!entityplayer.getBukkitEntity().canSee(player)) { return; } } + + entityplayer.g.remove(Integer.valueOf(this.tracker.id)); // Should be called destroyQueue // CraftBukkit end this.trackedPlayers.add(entityplayer); Packet packet = this.b(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 1b88232b..4e6dfb5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -631,7 +631,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { EntityTracker tracker = ((WorldServer) entity.world).tracker; EntityPlayer other = ((CraftPlayer) player).getHandle(); EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.id); - getHandle().g.remove(Integer.valueOf(other.id)); // Should be called destroyQueue if (entry != null && !entry.trackedPlayers.contains(getHandle())) { entry.updatePlayer(getHandle()); } |