diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-09-28 14:53:28 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-09-28 14:53:28 -0500 |
commit | b5580b6d95f025d72c117ebd28082c12c1c7a77c (patch) | |
tree | ac6a3ca66f1f4bd2788836e9aba2921e83191c3c /src | |
parent | 244a39d2097248881a6e3caa63e443bb308290d7 (diff) | |
download | craftbukkit-b5580b6d95f025d72c117ebd28082c12c1c7a77c.tar craftbukkit-b5580b6d95f025d72c117ebd28082c12c1c7a77c.tar.gz craftbukkit-b5580b6d95f025d72c117ebd28082c12c1c7a77c.tar.lz craftbukkit-b5580b6d95f025d72c117ebd28082c12c1c7a77c.tar.xz craftbukkit-b5580b6d95f025d72c117ebd28082c12c1c7a77c.zip |
Remove player from destroy queue when they go visible. Fixes BUKKIT-2071
If a plugin calls player.hidePlayer(other); then player.showPlayer(other);
in the same tick the other player will be added to the entity destroy queue
then a spawn packet will be sent. On the next tick the queue will be
processed and a destroy packet will be sent that renders the other player
invisible. To correct this we ensure the destroy queue is in sync with use
of the vanish API.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 4e6dfb5c..1b88232b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -631,6 +631,7 @@ 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()); } |