Interface UUIDProvider

All Known Implementing Classes:
BaseUUIDProvider

public interface UUIDProvider
Represents a provider that is used to resolve and store UUIDinvalid input: '<'->Username Pairs.
Since:
0.1.2.0
Author:
creatorfromhell
  • Method Details

    • api

      Returns the associated uuid api associated with this provider.
      Returns:
      The associated uuid api associated with this provider.
      See Also:
    • retrieve

      Used to retrieve a UUIDPair.
      Parameters:
      name - The username of the pair.
      Returns:
      An optional containing the pair if found, otherwise an empty optional.
    • retrieveName

      Used to retrieve a name from its associated UUID.
      Parameters:
      id - The UUID to use in the search.
      Returns:
      An optional containing the name if found, otherwise an empty optional.
    • store

      void store(UUIDPair pair)
      Used to store a Username invalid input: '&' UUID pair. This could be to a map, or to a database for persistent usage or to both.
      Parameters:
      pair - The UUIDPair
    • generateOffline

      default UUID generateOffline(String name)
    • validate

      static boolean validate(String name)
      Used to determine if a string is a valid minecraft username or not.
      Parameters:
      name - The name to check.
      Returns:
      True if the name is a valid minecraft username, otherwise false.
    • isUUID

      static boolean isUUID(String identifier)
      Used to determine if a string is a valid UUID.
      Parameters:
      identifier - The string to check.
      Returns:
      True if the name is a valid UUID, otherwise false.