Bukkit/CraftBukkit — pull request #837 by mrapple (2012-08-04 19:13:21+00:00)
Title: Fix the Vanish API not always showing players correctly. Fixes BUKKIT-2078

If you call player.hidePlayer(other) then player.showPlayer(other), other should be visible to player. However, this does not work due to the fact that 1.3.1 now sends batches of entity destroy packets every tick, not instantly and individually like in previous versions.

Since the destroy packet is added to the queue but not sent, a Packet20NamedEntitySpawn is sent first, then a Packet29DestroyEntity is sent afterwards when the queue is processed on the next tick.

A fix for this would be to clear the queue for a player when showPlayer(other) is called to make sure there are no extra Packet29DestroyEntity hanging around.

Leaky ticket: https://bukkit.atlassian.net/browse/BUKKIT-2078