Package com.marcusslover.plus.lib.mojang
Class MojangProfileAPI
java.lang.Object
com.marcusslover.plus.lib.mojang.MojangProfileAPI
Allows for the retrieval of a player's UUID from their username.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn object that keeps information about a player's name and UUID. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCleans the cache of a player.static Map<UUID, MojangProfileAPI.MojangProfile> Gets the cached map of profiles.static @NotNull CompletableFuture<@Nullable MojangProfileAPI.MojangProfile> getUniqueId(@NotNull String username) Gets the UUID of a player from their username.
-
Method Details
-
clean
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 aCompletableFuturethat will be completed when the UUID is retrieved.- Parameters:
username- The username of the player.- Returns:
- The UUID of the player.
-
getCachedProfileMap
Gets the cached map of profiles.- Returns:
- The cached map of profiles.
-