Vanish doesn't remove players from server list ping in Paper 1.12
Antivalent opened this issue ยท 2 comments
Pretty self-explanatory. When players enter vanish mode, EssentialsX would remove their name from the serverlist ping and decrease the player count returned to a query or game client pinging the server. However, this is no longer the case in EssentialsX 2.0.1-b501 (although I have a feeling that this occured when switching to 1.12 rather than by updating EssentialsX) and game clients or queries pinging the server will get the correct (visible+vanished) player count as well as the full list of player names.
EssentialsX version: 2.0.1-b501
Server software: git-Paper-1167 (MC: 1.12)
I can't see any changes in Spigot that would cause this - I'm looking into Paper now. If anyone can try and replicate this in Spigot 1.12, it would be greatly appreciated.
EDIT: Seems like Paper added a new method to the Spigot API through a patch, ServerListPingEvent#setSampleText
, and this breaks our current implementation.
The relevant patches:
It looks like we'll have to use reflection to determine which method to use - I don't know which server implementations use Paper's API and which use Spigot's (or a superset of them).
EDIT 2: I've started to work on this - seems like the 1.12.1 update changed the patch number, breaking the second link, so I've fixed it to point to the right patch.