Closed LoneDev6 closed 4 years ago
Bump
If the player is logged in using an premium connection and premiumUUID
is enabled, then the premium UUID will be returned on getUniqueId()
. However if the server is in offline mode (onlinemode
setting), the server will use the UUID based on the player name in offline mode except BungeeCord is also enabled, then it will first try search the user profile cache.
So it's a spigot bug? I mean, spigot MUST check on its cache (or implement UUID caching system). But Bungeecord has UUID caching system?
If it's like that you should add this to FAQ, it's really important to avoid confusion
Sorry if that was misleading. No it's not bug of Spigot. I think everything works as it should. For Spigot either onlinemode or offlinemode exists. Mixed onlinemode isn't really supported.
I mean, spigot MUST check on its cache (or implement UUID caching system).
It does if the server is either in onlinemode or uses BungeeCord. Otherwise file access is redundant, because offlinemode UUIDs are only dependent on the case sensitive username.
But Bungeecord has UUID caching system?
No, Spigot has. Sorry if that was misleading.
If it's like that you should add this to FAQ, it's really important to avoid confusion
I just found that out, but yes you are right.
Thanks a lot! I think we could try to hook/patch the original Spigot method getUniqueId to return premium UUID when premium user is not ingame (and FastLogin is loaded, obv). I don't really know if it's possible to edit bytecode at runtime or to detour a function while Spigot is running.
There are multiple reasons against it. Sorry to say that.
Thanks for the clarification! I edited my plugins to cache UUIDs in files, I hope also other plugins will do the same.
What behaviour is observed:
UUID is not replaced to premium when plugins call getUniqueId on offline player. So plugins will get a different UUID if they get UUID when user is offline.
What behaviour is expected:
A way to allow plugins that need to get UUID to get the same UUID when user is online and offline
Steps/models to reproduce:
Call this code when user is online and after user is logged out: System.out.println(Bukkit.getOfflinePlayer("LoneDev").getUniqueId().toString());
User must be premium and "premiumUuid" option of FastLogin must be set to true
Plugin list:
Authme and FastLogin
Environment description
1.14.4, Paper
Plugin version or build number (don't write latest):
git-Paper-209
Configuration:
https://hasteb.in/ogahaqan.yaml