Class Profileable.PlayerProfileable
java.lang.Object
com.cryptomorin.xseries.profiles.objects.cache.CacheableProfileable
com.cryptomorin.xseries.profiles.objects.cache.TimedCacheableProfileable
com.cryptomorin.xseries.profiles.objects.Profileable.PlayerProfileable
- All Implemented Interfaces:
Profileable
- Enclosing interface:
Profileable
Bedrock Players
We need to support hybrid server software like Geyser that has their own way of calculating the UUID. This will be problematic for Bedrock players as their UUID system is completely different. To obtain a Bedrock player's Floodgate UUID (whether the server is offline/online):- Strip the username prefix (a dot by default.)
- Go to www.cxkes.me and search their username.
- You'll see that Bedrock players use an XUID which is their unique Xbox Live account ID.
- For the UUID, you need to take their XUID in the HEX format not DEC.
- Now their fake UUID (or more specifically Floodgate UUID) will be their XUID with leading zeros to fill the rest of the UUID characters.
Martinacasas234 with XUID 2535442111844868 (DEC):
XUID (HEX): 0009 01F89E6CD204
UUID: 00000000-0000-0000-0009-01f89e6cd204
Alternatively, you could get the calculated UUID directly from mcprofile.io.
This is also mentioned in Geyser's FAQ.
Trying to look up this UUID from Mojang's API or other third-party Java Edition online lookup tools will not work, obviously.
Note that their skin texture URL still follow the textures.minecraft.net URL.
These services themselves don't make a direct API request to Xbox/Microsoft services since this specific information (converting gamertag -> XUID) is a lengthy process. You can read more about it in this StackOverflow question and this den.dev blog post. The client iself is sending the XUID to the server along with the gamertag, which means we would need to add direct support for Geyser:
io.netty
↓
CloudburstMC's packet encoder
↓
Geyser's UpstreamPacketHandler#handle(LoginPacket)
↓
Geyser's LoginEncryptionUtils
↓
CloudburstMC's EncryptionUtils#validateChain
↓
CloudburstMC's ChainValidationResult#identityClaims
China's NetEase
This is unrelated toMinecraft: China Edition. For Java edition, NetEase
(company associated with contributing to Minecraft: China Edition development) has its own authentication
system instead of Mojang's Yggdrasil and its own private Forge mod for handling GameProfiles.
The GameProfile in the server doesn't seem to contain any texture URL but it seems like the
mod itself handles the skin by sending a request (private information) and retrieving the skin directly
from the client itself using the username/UUID only.
Their UUID implementation is custom and the algorithm is private information.
Solution?
So the solution to all of this would be to make use of the newerPlayerProfile
when available and defaulting back to the provided GameProfile from the CraftBukkit instance directly
using a system property.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.cryptomorin.xseries.profiles.objects.Profileable
Profileable.DynamicGameProfileProfileable, Profileable.PlayerProfileable, Profileable.PlayerProfileProfileable, Profileable.RawGameProfileProfileable, Profileable.StringProfileable, Profileable.UsernameProfileable, Profileable.UUIDProfileable -
Field Summary
Fields inherited from class com.cryptomorin.xseries.profiles.objects.cache.CacheableProfileable
cache, lastError -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.mojang.authlib.GameProfileA string representation of theProfileable.getProfile()which is useful for data storage which can be serialized back usingProfileable.detect(String).Methods inherited from class com.cryptomorin.xseries.profiles.objects.cache.TimedCacheableProfileable
expiresAfter, hasExpiredMethods inherited from class com.cryptomorin.xseries.profiles.objects.cache.CacheableProfileable
getProfile, hasExpired, isReady, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.cryptomorin.xseries.profiles.objects.Profileable
getDisposableProfile, prepare, test, transform
-
Constructor Details
-
PlayerProfileable
public PlayerProfileable(org.bukkit.OfflinePlayer player)
-
-
Method Details
-
getProfileValue
Description copied from interface:ProfileableA string representation of theProfileable.getProfile()which is useful for data storage which can be serialized back usingProfileable.detect(String).Note that in some cases this is the Base64 value of the textures property, but some may provide less verbose data when possible. Items and blocks can also provide compact data if their profile was built using
ProfileTransformer.includeOriginalValue().- Returns:
- null if
Profileable.getProfile()is null or the set profile doesn't have a texture property.
-
cacheProfile
protected com.mojang.authlib.GameProfile cacheProfile()- Specified by:
cacheProfilein classCacheableProfileable
-