Paper
Paper copied to clipboard
Feature/player listing api
These patches aim to expose the new player listing features present in 1.19.3; the implementation is not complete as it does not account for certain states.
For the implementation to be "complete" there needs to be discussion on potential API behavioral changes to what currently exist; along with more API to cover what was changed or removed.
This PR simply exposes the new API as-is and readies for the following changes.
Maybe a suggestion to incorporate this as another parameter to hide/showPlayer overload, so you can hide the player as an entity while retaining said player in the tab list...
Maybe a suggestion to incorporate this as another parameter to hide/showPlayer overload, so you can hide the player as an entity while retaining said player in the tab list...
I don't think this is necessarily a good idea; the showPlayer/hidePlayer is going to get complicated rather quickly; new API for specifically this is probably better for right now. We'll be looking to improve and expand on this as it gets built. For now new API is good here since it leaves the showPlayer hidePlayer logic alone.
There are missing possible "states" but considering how to implement that will further complicate the system and will need to be further discussed; probably more than this PR will require.
As for the rest of the comments they should be resolved.
Yeah, you are right, it was just a suggestion. Why I suggested it when there is always the possibility to use this api alongside show/hide api was, because if you hide a player and then reshow him in tablist, then the player would be hidden from the tablist and then immediately reshown. From what I saw in the code, I thought handling showing/hiding the player could have its own implementation since the logic to hide/show the player in tablist is already in the hide/show player methods.
I can then create a separate PR once yours is merged.