Conversation
This commit adds an event that gets fired whenever an entity is added to a player's entity tracker. Cancelling this event prevents the entity from being added, and consequently, the entity is never sent (nor updated) for the player. While this is essentially the same method that Bukkit's hidden player system uses, simply cancelling the event does not make sure that the entity is not interacted with, and the player can still see them in some places (e.g. in the player list and the scoreboard).
|
I don't think this should be fired for player entities. As you explain, the proper way to hide players is via |
|
While this new API might mislead some users into implementing a vanish system from scratch, I think artificially limiting an API only because someone might not read the Javadoc isn't the right way to go. Originally, I had the event's Javadoc explicitly state that cancelling the event only hides the "player model" in-game while leaving everything else that mentions the player in place. Do you think that with this part added back to the class' comment, the chance of potential misuse would be acceptably low? |
This PR adds a KigPaper-API way to hide entities from players. This change is useful when using entities to display something while not wanting other players to see the "visual noise".