EssentialsX

EssentialsX

2M Downloads

Vanish doesn't remove players from server list ping in Paper 1.12

Antivalent opened this issue ยท 2 comments

commented

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)

commented

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.

commented

Thanks! I honestly didn't expect Paper to be the issue here. I'll try and test it with Spigot 1.12 later today. I edited the title because it might be misleading otherwise.

Edit: The issue does not occur with the latest Spigot 1.12 (git-Spigot-596221b-2c5c611)