GlowstoneMC/Glowstone — pull request #390 by Johni0702 (2014-10-07 12:59:07+00:00)
Title: Add player visibility API 

Resolves #121
This implements the `hidePlayer`, `showPlayer` and `canSee(Player)` methods of `GlowPlayer` as well as performing necessary checks when sending the user list entries (tablist) and spawning the player entities.
Checks when sending chat (as suggested in the ticket) are not performed because (even though undocumented) no other Bukkit implementation does so.
Players will reappear after they reconnect (unless a plugin hides them again) which matches the behavior in CraftBukkit.

No changes were made to the `canSee(GlowChunk.Key)` and `canSee(GlowEntity)` methods as those are (even though similar named) not responsible for determining whether a chunk/entity is hidden from the player but rather whether they have been sent to the client.

This implementation hides players based on their UUIDs and therefore would also allow for hiding all other entities in the the future.