Can't get UUID from offline players that have Spaces/Underscores on their names.
Describe the bug
I mean, it is possible to get it, but it is a gamble.
Suppose my GamerTag is yLorD Magnus, geyser/floodgate converts to -yLorD_Magnus
If I'm offline and try to use the FloodGateAPI (as dependency of my plugin)/GeyserAPI (https://api.geysermc.org/) at max I can filter out the prefix -, ending up with yLorD_Magnus but then, since the UUID retrieval for offline players is based on the original GamerTag I have no way of knowing if the original GamerTag was yLorD Magnus or yLorD_Magnus, one will work, the other will just spit out an error or I might get the wrong profile.
This problem can get bigger and bigger depending on the amount of underscores/spaces the original gamertag had.
To Reproduce
- Gamble?
Expected behaviour
- Getting the player UUID 100% and not gamble.
Screenshots / Videos
No response
Server Version and Plugins
No response
Geyser Dump
No response
Geyser Version
2.1.0-SNAPSHOT (git-master-f9705c1)
Minecraft: Bedrock Edition Device/Version
No response
Additional Context
No response
well, what you're describing though is an inherent gamble How is the Geyser API supposed to know whether a player where the _ replacement, that coincides with another exact same java username, is or isn't a Bedrock player? Without the prefix, there is no way to tell that. heck, it's why it's even there, to avoid such username issues
I really don't see how we're supposed to "guess" without the prefix
https://api.geysermc.org/docs#/utils/GlobalApiWeb.Api.UtilsController.get_bedrock_or_java_uuid However, if you use this endpoint with the prefix, you should probably get the correct UUID.
https://api.geysermc.org/docs#/utils/GlobalApiWeb.Api.UtilsController.get_bedrock_or_java_uuid However, if you use this endpoint with the prefix, you should probably get the correct UUID.
it only filters out the prefix, it is unable to know if the underscores are indeed part of the gamertag or if they were introduced by Geyser
I really don't see how we're supposed to "guess" without the prefix
Huh, I don't get what you are talking about here, that doesn't seem to be the same thing I mentioned on my post
https://api.geysermc.org/docs#/utils/GlobalApiWeb.Api.UtilsController.get_bedrock_or_java_uuid However, if you use this endpoint with the prefix, you should probably get the correct UUID.
it only filters out the prefix, it is unable to know if the underscores are indeed part of the gamertag or if they were introduced by Geyser
From what I can tell it (that particular endpoint) uses the prefix to make a proper guess about if that's java or bedrock, and returns either a floodgate UUID for bedrock, and UUID for java players. Underscores shouldn't matter at all in that endpoint.
I really don't see how we're supposed to "guess" without the prefix
Huh, I don't get what you are talking about here, that doesn't seem to be the same thing I mentioned on my post
Let's ask it differently then, why are you filtering out the prefix before calling the Geyser API endpoint?
Let's ask it differently then, why are you filtering out the prefix before calling the Geyser API endpoint?
I'm not...


my gamertag is yLorD Magnus but since Geyser converts my name on the game to yLorD_Magnus it just errors out...
Okay, now that is a likely a bug with that endpoint; it should probably replace all underscores back to spaces if there's a prefix present
Then again, you could probably get away with checking if there's a prefix, and if there is, replace the "_" in the name to a space; and then call that endpoint. That should work as I don't think Xbox live allows for "_" in their usernames
Okay, now that is a likely a bug with that endpoint; it should probably replace all underscores back to spaces if there's a prefix present
Then again, you could probably get away with checking if there's a prefix, and if there is, replace the "" in the name to a space; and then call that endpoint. That should work as I don't think Xbox live allows for "" in their usernames
For some reason I was certain that I had already seen GamertTags with underscores, guess I was just wrong, after searching a bit about it, it doesn't seem to be possible to use underscores on gamertags, and I was just being stupid af, sorry bout that >.>