Commit
a2af8f0a730c11af84d995ccfcf36544ddb4eea0
by md_5SPIGOT-3207: Fix hiding players in a BukkitRunnable after joining
This happened because "joining" wasn't cleared until the player was
ticked. Runnables (presumably) ran _after_ the player list packet was
sent, but before the player was ticked; thus, the player list packet was
sent, but not cleared. The fix is to replace joining with
hasSentListPacket, which is set immediately before sending any player
list packets (thus, if hidePlayer is called after, it sees that the list
packet has been sent and sends a new one to reset it). With this fix,
the player is added to the list and then removed shortly afterwards.
The reason why running /hideall in the example wouldn't fix the
invisibility is because the server already thinks the player's been
removed from the list (as they're hidden), and thus doesn't want to send
another hide packet. This is correct behavior assuming that they get
hidden correctly the first time, which they now do.