EssentialsX

EssentialsX

2M Downloads

White nicks on tab when dying

linsaftw opened this issue ยท 8 comments

commented

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

commented

Duplicate at #1585

commented

How is this fixed?

commented

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.

LuckPerms/LuckPerms@5a34fa1

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. ๐Ÿ˜•

commented

@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?

commented

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.

commented

Yes, it's solved ๐Ÿ˜Š

commented

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.

commented

When two great developers work together...