Interface PlayerDTO


public interface PlayerDTO
Public view of a player record stored by Dominion.

Player records contain the last known profile information used by the API; they do not require the player to be online.

  • Field Details

    • UNKNOWN

      static final PlayerDTO UNKNOWN
      Placeholder record used when a player cannot be resolved from the cache. Its numeric identifiers are -1, its UUID is the all-zero UUID, and its name is "Unknown".
  • Method Details

    • getId

      Integer getId()
      Gets the ID of the player.
      Returns:
      the ID of the player
    • getUuid

      UUID getUuid()
      Gets the UUID of the player.
      Returns:
      the UUID of the player
    • getLastKnownName

      String getLastKnownName()
      Gets the last known name of the player.
      Returns:
      the last known name of the player
    • updateLastKnownName

      PlayerDTO updateLastKnownName(@NotNull @NotNull String name, @Nullable @Nullable URL skinUrl) throws SQLException, MalformedURLException
      Updates the last known name and skin URL of the player.
      Parameters:
      name - the new last known name of the player
      skinUrl - the new skin URL, or null to use the default skin
      Returns:
      this player record after the profile has been updated
      Throws:
      SQLException - if the profile cannot be persisted
      MalformedURLException - if the supplied or default skin URL is invalid
    • getUsingGroupTitleID

      Integer getUsingGroupTitleID()
      Gets the ID of the group title the player is using.
      Returns:
      the ID of the group title the player is using
    • getSkinUrl

      @NotNull @NotNull URL getSkinUrl() throws MalformedURLException
      Gets the URL of the player's skin.

      Implementations may return a default skin URL when no custom skin is stored.

      Returns:
      the URL of the player's skin
      Throws:
      MalformedURLException - if the stored skin URL is malformed