Class ProfileCache

java.lang.Object
net.glowstone.entity.meta.profile.ProfileCache

public class ProfileCache extends Object
Cached methods for accessing Mojang servers to find UUIDs and player profiles.
  • Constructor Details

    • ProfileCache

      public ProfileCache()
  • Method Details

    • getProfile

      public static CompletableFuture<GlowPlayerProfile> getProfile(UUID uuid)
      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

      public static CompletableFuture<UUID> getUuid(String playerName)
      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

      public static UUID getUuidCached(String playerName)
      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.