Essentials: White nicks on tab when dying

Created on 12 Nov 2017  路  8Comments  路  Source: EssentialsX/Essentials


When players die their prefix get removed with the change-displayname option activated.
I reported this to LuckPerms (My permissions plugin) but they say is a essentials error.


LuckPerms: Latest

2.0.1-bSNAPSHOT

Paperspigot 1.12.2

EssentialsX config: https://hastebin.com/unidilatiw.coffeescript

Capture of the bug:

2017-11-12_16 02 23

Most helpful comment

TIL Bukkit#getPlayer(String) returns null for online players when called from the PlayerRespawnEvent.

Looks like it's been this way for a while - I never knew about it though, and it's not mentioned in any Javadocs. 馃檪

https://bukkit.org/threads/bukkit-getplayer-fails-on-playerrespawnevent.118712/
https://hub.spigotmc.org/jira/browse/SPIGOT-1089

Essentials was requesting prefix data from LuckPerms during the PlayerRespawnEvent, which was hitting this Vault method in LP.

https://github.com/lucko/LuckPerms/blob/0b72507e2d2a2bdffe45bb19ad5ea136a800819f/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java#L78-L87

... and returning null. So anyway, mystery is solved.

All 8 comments

How is this fixed?

Just gonna drop this here:
https://gfycat.com/QuarrelsomeMelodicCero~~

As far as I can tell, this isn't an issue caused at my end

I appreciate you're stretched a bit as maintainers, so I might try look into making a PR if I can work out a fix.

I've done some more debugging - seems like this was caused by some race condition in the LP vault implementation. I'm guessing something to do with the way Vault downgrades requests to use usernames, since I made a patch around that and it seems to have fixed the issue.

https://github.com/lucko/LuckPerms/commit/5a34fa182a659aad5c29f127cb1bc2c7bd311cf1

I apologise for blaming Essentials, my bad for not looking into it more. However yeah, pretty strange for it to return reliable results at all times, except from when a player respawns. 馃槙

@lucko No worries - I hadn't looked into this much, and actually assumed that it was a bug within EssentialsX. Thanks for the quick patch!

@LinsaFTW @Xubels @SoSeDik Could you update to the latest LuckPerms dev build to confirm that the issue is resolved?

TIL Bukkit#getPlayer(String) returns null for online players when called from the PlayerRespawnEvent.

Looks like it's been this way for a while - I never knew about it though, and it's not mentioned in any Javadocs. 馃檪

https://bukkit.org/threads/bukkit-getplayer-fails-on-playerrespawnevent.118712/
https://hub.spigotmc.org/jira/browse/SPIGOT-1089

Essentials was requesting prefix data from LuckPerms during the PlayerRespawnEvent, which was hitting this Vault method in LP.

https://github.com/lucko/LuckPerms/blob/0b72507e2d2a2bdffe45bb19ad5ea136a800819f/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java#L78-L87

... and returning null. So anyway, mystery is solved.

Yes, it's solved 馃槉

When two great developers work together...

Was this page helpful?
0 / 5 - 0 ratings