Paper
Paper copied to clipboard
Player#hideEntity/Player#hidePlayer and Entity#setVisibleByDefault on player should allow not removing player's name from player list
Is your feature request related to a problem?
I think it'd be very useful for only hiding players without removing them from player list
Describe the solution you'd like.
Something like:
player.hideEntity(plugin, player2, false)
player.hidePlayer(plugin, player2, false)
player2.setVisibleByDefault(false, false)
Describe alternatives you've considered.
-
Other
No response
I needed this, it's quite annoying that bukkit API has extra packet sending to hide the player from tablist
I very much agree with the above mentioned suggestions.
Hi, I made some changes to the code and I think it works, but idk until i can test it... maybe anyone who can help?
I expected Player.hideEntity() to keep player listed in tab. I tried working around this using Player.listPlayer(), however you can't list hidden players. (I am getting IllegalStateException("Player cannot see other player")). If someone have a workaround until this is worked on, i would be glad to take it.
It's a little trickly. hideEntity and hidePlayer do the same thing right now, and hidePlayer has existed WAY longer and plugins rely on that completely removing the Player from connected clients. If we reversed course and made it so it didn't completely remove other players, then vanish abilities would be broken as any client would still know that player was online.
Since just separate tab list hide was added pretty recently by mojang, I think new API is better for that instead of changing the behavior of these existing methods
I expected Player.hideEntity() to keep player listed in tab. I tried working around this using Player.listPlayer(), however you can't list hidden players. (I am getting IllegalStateException("Player cannot see other player")). If someone have a workaround until this is worked on, i would be glad to take it.
Hi, would @XxGoldenbluexX idea be aligned with the principle (mentionned by @Machine-Maker) that hidePlayer behavior should not be changed ? Do some plugins really use Player.hideEntity expecting it to hide a player from the tab list? If so, then would adding another function Player.hidePlayer(Plugin plugin, Player player, boolean hideFromList) (while keeping the original Player.hidePlayer(Plugin plugin, Player player)) do the job?