Class UUIDUtility

java.lang.Object
com.djrapitops.plan.identification.UUIDUtility

@Singleton public class UUIDUtility extends Object
Utility for fetching a user's UUID.

Attempts are made in order: - Parse UUID out of the given String - Find an UUID from the database matching the player name - Find an UUID from Mojang API that matches the player name

  • Constructor Details

  • Method Details

    • parseFromString

      public static Optional<UUID> parseFromString(String uuidString)
    • getNameOf

      public Optional<String> getNameOf(String possiblePlayerUUID)
    • getNameOf

      public Optional<String> getNameOf(UUID playerUUID)
    • getUUIDOf

      @Nullable public @Nullable UUID getUUIDOf(String playerName)
      Get UUID of a player.
      Parameters:
      playerName - Player's name
      Returns:
      UUID of the player