Interface DominionDTO


public interface DominionDTO
Interface representing a Dominion Data Transfer Object (DTO).
  • Method Details

    • getId

      @NotNull @NotNull Integer getId()
      Gets the ID of the dominion.
      Returns:
      the ID of the dominion
    • getOwner

      @NotNull @NotNull UUID getOwner()
      Gets the UUID of the dominion owner.
      Returns:
      the UUID of the dominion owner
    • getOwnerDTO

      @NotNull @NotNull PlayerDTO getOwnerDTO()
      Gets the DTO of the dominion owner.
      Returns:
      the DTO of the dominion owner
    • setOwner

      @NotNull @NotNull DominionDTO setOwner(UUID owner) throws SQLException
      Sets the owner of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      owner - the UUID of the dominion owner
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • setOwner

      @NotNull @NotNull DominionDTO setOwner(org.bukkit.entity.Player owner) throws SQLException
      Sets the owner of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      owner - the dominion owner
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getName

      @NotNull @NotNull String getName()
      Gets the name of the dominion.
      Returns:
      the name of the dominion
    • setName

      @NotNull @NotNull DominionDTO setName(String name) throws SQLException
      Sets the name of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      name - the name of the dominion
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getWorld

      @Nullable @Nullable org.bukkit.World getWorld()
      Gets the world where the dominion is located. Returns null if the world does not exist.
      Returns:
      the world where the dominion is located
    • getWorldUid

      @NotNull @NotNull UUID getWorldUid()
      Gets the UUID of the world where the dominion is located. This method guarantees a non-null UUID, but does not guarantee the existence of the world. To check if the world exists, use getWorld().
      Returns:
      the UUID of the world where the dominion is located
    • getCuboid

      @NotNull @NotNull CuboidDTO getCuboid()
      Gets the cuboid of the dominion.
      Returns:
      the cuboid of the dominion
    • setCuboid

      @NotNull @NotNull DominionDTO setCuboid(@NotNull @NotNull CuboidDTO cuboid) throws SQLException
      Sets the cuboid of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      cuboid - the cuboid of the dominion
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getParentDomId

      @NotNull @NotNull Integer getParentDomId()
      Gets the ID of the parent dominion.
      Returns:
      the ID of the parent dominion, or -1 if there is no parent dominion
    • getJoinMessage

      @NotNull @NotNull String getJoinMessage()
      Gets the welcome message of the dominion.
      Returns:
      the welcome message of the dominion
    • setJoinMessage

      @NotNull @NotNull DominionDTO setJoinMessage(String joinMessage) throws SQLException
      Sets the welcome message of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      joinMessage - the welcome message of the dominion
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getLeaveMessage

      @NotNull @NotNull String getLeaveMessage()
      Gets the leave message of the dominion.
      Returns:
      the leave message of the dominion
    • setLeaveMessage

      @NotNull @NotNull DominionDTO setLeaveMessage(String leaveMessage) throws SQLException
      Sets the leave message of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      leaveMessage - the leave message of the dominion
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getEnvironmentFlagValue

      @NotNull @NotNull Map<EnvFlag,Boolean> getEnvironmentFlagValue()
      Gets all environment flag values of the dominion.
      Returns:
      the environment flag values of the dominion
    • getEnvFlagValue

      boolean getEnvFlagValue(@NotNull @NotNull EnvFlag flag)
      Gets the value of a specific environment flag of the dominion.
      Parameters:
      flag - the environment flag
      Returns:
      the value of the environment flag
    • getGuestPrivilegeFlagValue

      @NotNull @NotNull Map<PriFlag,Boolean> getGuestPrivilegeFlagValue()
      Gets all guest privilege flag values of the dominion.
      Returns:
      the guest privilege flag values of the dominion
    • getGuestFlagValue

      boolean getGuestFlagValue(@NotNull @NotNull PriFlag flag)
      Gets the value of a specific guest privilege flag of the dominion.
      Parameters:
      flag - the guest privilege flag
      Returns:
      the value of the guest privilege flag
    • setEnvFlagValue

      @NotNull @NotNull DominionDTO setEnvFlagValue(@NotNull @NotNull EnvFlag flag, @NotNull @NotNull Boolean value) throws SQLException
      Sets the value of a specific environment or guest privilege flag of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      flag - the flag
      value - the value of the flag
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • setGuestFlagValue

      @NotNull @NotNull DominionDTO setGuestFlagValue(@NotNull @NotNull PriFlag flag, @NotNull @NotNull Boolean value) throws SQLException
      Sets the value of a specific environment or guest privilege flag of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      flag - the flag
      value - the value of the flag
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getTpLocation

      @NotNull @NotNull org.bukkit.Location getTpLocation()
      Gets the teleport location of the dominion. If no teleport location is set, returns the center location of the dominion.
      Returns:
      the teleport location of the dominion
    • setTpLocation

      @NotNull @NotNull DominionDTO setTpLocation(org.bukkit.Location tpLocation) throws SQLException
      Sets the teleport location of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      tpLocation - the teleport location of the dominion
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getColorR

      int getColorR()
      Gets the red component of the dominion's color.
      Returns:
      the red component of the dominion's color
    • getColorG

      int getColorG()
      Gets the green component of the dominion's color.
      Returns:
      the green component of the dominion's color
    • getColorB

      int getColorB()
      Gets the blue component of the dominion's color.
      Returns:
      the blue component of the dominion's color
    • getColor

      @NotNull @NotNull String getColor()
      Gets the color of the dominion as a string.
      Returns:
      the color of the dominion as a string
    • getColorHex

      int getColorHex()
      Gets the hexadecimal representation of the dominion's color.
      Returns:
      the hexadecimal representation of the dominion's color
    • setColor

      @NotNull @NotNull DominionDTO setColor(@NotNull @NotNull org.bukkit.Color color) throws SQLException
      Sets the color of the dominion. Returns the dominion object if successful, otherwise returns null.
      Parameters:
      color - the color
      Returns:
      the dominion object
      Throws:
      SQLException - if a database access error occurs
    • getGroups

      List<GroupDTO> getGroups()
      Gets all groups of the dominion.
      Returns:
      the list of groups
    • getMembers

      List<MemberDTO> getMembers()
      Gets all members of the dominion.
      Returns:
      the list of members
    • getServerId

      Integer getServerId()
      Gets the server ID associated with the dominion.
      Returns:
      the server ID associated with the dominion