Interface ProfileResolver


public interface ProfileResolver
Looks up player names and uuids, both from the running server and from Mojang.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull String
    The display name of an entity, falling back to its type for anything that is not a player.
    @NonNull UUID
    The offline-mode id a server derives from a name, without contacting Mojang.
    @NonNull String
    resolveOnlineName(@NonNull UUID uuid)
    The name registered with Mojang for a uuid.
    @Nullable UUID
    resolveOnlineUUID(@NonNull String name)
    The Mojang account id for a name.
  • Method Details

    • resolveName

      @NonNull String resolveName(FEntity entity)
      The display name of an entity, falling back to its type for anything that is not a player.
      Parameters:
      entity - the entity to name
      Returns:
      the resolved name
    • resolveOnlineName

      @NonNull String resolveOnlineName(@NonNull UUID uuid)
      The name registered with Mojang for a uuid.
      Parameters:
      uuid - the account id
      Returns:
      the resolved name, or an empty string if the lookup failed
    • resolveOnlineUUID

      @Nullable UUID resolveOnlineUUID(@NonNull String name)
      The Mojang account id for a name.
      Parameters:
      name - the player name
      Returns:
      the account id, or null if the lookup failed
    • resolveOfflineUUID

      @NonNull UUID resolveOfflineUUID(String name)
      The offline-mode id a server derives from a name, without contacting Mojang.
      Parameters:
      name - the player name
      Returns:
      the derived id