Open archer-321 opened 2 years ago
I don't think this should be fired for player entities. As you explain, the proper way to hide players is via Player#hidePlayer
, which already takes care of disabling trackers.
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. Moreover, players are entities, so when the event claims that it's going to be fired for all entities (and if we leave the doc comments as they are right now), skipping the event for players would be a faulty implementation.
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".