White nicks on tab when dying
linsaftw opened this issue ยท 8 comments
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:
Duplicate at #1585
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.
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.
... and returning null. So anyway, mystery is solved.
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.