Class ProfileCache
java.lang.Object
net.glowstone.entity.meta.profile.ProfileCache
Cached methods for accessing Mojang servers to find UUIDs and player profiles.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<GlowPlayerProfile>
getProfile
(UUID uuid) Look up the GlowPlayerProfile for a given UUID.static CompletableFuture<UUID>
Look up the UUID for a given username.static UUID
getUuidCached
(String playerName) Look up the UUID for a given username, but only in the cache and not on the Mojang server.
-
Constructor Details
-
ProfileCache
public ProfileCache()
-
-
Method Details
-
getProfile
Look up the GlowPlayerProfile for a given UUID.- Parameters:
uuid
- The UUID to look up.- Returns:
- A GlowPlayerProfile future, contains a null name if the lookup failed.
-
getUuid
Look up the UUID for a given username.- Parameters:
playerName
- The name to look up.- Returns:
- A UUID future, UUID may be null on failure.
-
getUuidCached
Look up the UUID for a given username, but only in the cache and not on the Mojang server.- Parameters:
playerName
- The name to look up.- Returns:
- A UUID, or null if it's not found in the cache.
-