summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-10-13 15:27:45 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-10-13 15:27:45 -0500
commit506a1a0765b34574bef661f622fd0ab654cea8fb (patch)
tree67a027d6dcae5e63cae2d4f7a3087f95cde074bb /src/main/java/org/bukkit
parentcb2f8244e9d6ad8861706bf4dc771ac8e5104438 (diff)
downloadcraftbukkit-506a1a0765b34574bef661f622fd0ab654cea8fb.tar
craftbukkit-506a1a0765b34574bef661f622fd0ab654cea8fb.tar.gz
craftbukkit-506a1a0765b34574bef661f622fd0ab654cea8fb.tar.lz
craftbukkit-506a1a0765b34574bef661f622fd0ab654cea8fb.tar.xz
craftbukkit-506a1a0765b34574bef661f622fd0ab654cea8fb.zip
Ensure entity isn't destroyed when trying to show it. Fixes BUKKIT-2038
If two players (or a player and any other entity) are teleported to the same location in the same tick they will both get added to the other's destroy queue then have a new entity spawn packet sent. Next tick the destroy queue will be processed and they will then be invisible to each other. To prevent this situation we remove the entity from the destroy queue when sending out a spawn packet for them.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java1
1 files changed, 0 insertions, 1 deletions
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());
}