Class MojangProfileAPI

java.lang.Object
com.marcusslover.plus.lib.mojang.MojangProfileAPI

public class MojangProfileAPI extends Object
Allows for the retrieval of a player's UUID from their username.
  • Method Details

    • clean

      public static void clean(@NotNull @NotNull UUID uuid)
      Cleans the cache of a player.
      Parameters:
      uuid - The UUID of the player.
    • getUniqueId

      @NotNull public static @NotNull CompletableFuture<@Nullable MojangProfileAPI.MojangProfile> getUniqueId(@NotNull @NotNull String username)
      Gets the UUID of a player from their username. This function is asynchronous and will return a CompletableFuture that will be completed when the UUID is retrieved.
      Parameters:
      username - The username of the player.
      Returns:
      The UUID of the player.
    • getCachedProfileMap

      public static Map<UUID,MojangProfileAPI.MojangProfile> getCachedProfileMap()
      Gets the cached map of profiles.
      Returns:
      The cached map of profiles.