Class UUIDUtility


  • @Singleton
    public class UUIDUtility
    extends java.lang.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

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.UUID getUUIDOf​(java.lang.String playerName)
      Get UUID of a player.
      static java.util.Optional<java.util.UUID> parseFromString​(java.lang.String uuidString)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parseFromString

        public static java.util.Optional<java.util.UUID> parseFromString​(java.lang.String uuidString)
      • getUUIDOf

        public java.util.UUID getUUIDOf​(java.lang.String playerName)
        Get UUID of a player.
        Parameters:
        playerName - Player's name
        Returns:
        UUID of the player