Package cn.lunadeer.dominion.api.dtos
Interface PlayerDTO
public interface PlayerDTO
Interface representing a Player Data Transfer Object (DTO).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum representing the type of user interface preferred by the player. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Gets the ID of the player.Gets the last known name of the player.@NotNull URL
Gets the URL of the player's skin.@NotNull PlayerDTO.UI_TYPE
Gets the player's preferred user interface type.Gets the ID of the group title the player is using.getUuid()
Gets the UUID of the player.void
setUiPreference
(PlayerDTO.UI_TYPE uiType) Sets the player's preferred user interface type.updateLastKnownName
(@NotNull String name, @Nullable URL skinUrl) Updates the last known name of the player.
-
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 of the player. Returns the updated player object.- Parameters:
name
- the new last known name of the player- Returns:
- the updated player object
- Throws:
SQLException
MalformedURLException
-
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
Gets the URL of the player's skin.- Returns:
- the URL of the player's skin
- Throws:
MalformedURLException
-
getUiPreference
Gets the player's preferred user interface type.- Returns:
- the preferred user interface type
-
setUiPreference
Sets the player's preferred user interface type.- Parameters:
uiType
- the preferred user interface type to set- Throws:
SQLException
- if an error occurs while updating the database
-