Interface ClaimManager


@NonExtendable public interface ClaimManager
The ClaimManager provides methods to interact with land claims, protections, and whitelists within the BuildMC plugin.

It allows checking claim ownership, player permissions, protections, and managing claims through players or teams.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPlayerToWhitelist(long claimID, UUID playerID)
    Adds a player to a claim's whitelist.
    void
    addProtection(long claimId, @NotNull Protection protection)
    Adds a protection to a claim by ID.
    void
    addProtection(long claimId, @NotNull org.bukkit.NamespacedKey protection)
    Adds a protection to a claim by ID.
    void
    addProtection(@NotNull Claim claim, @NotNull Protection protection)
    Adds a protection to a claim by ID.
    void
    addProtection(@NotNull Claim claim, @NotNull org.bukkit.NamespacedKey protection)
    Adds a protection to a claim by ID.
    void
    Deletes multiple Claim objects from the system and removes them from the database.
    boolean
    Checks whether the owner already has a claim with the given name.
    com.google.common.collect.ImmutableSet<Claim>
    Retrieves all Claim entries stored in the database.
    @Nullable Claim
    getClaim(@NotNull org.bukkit.Location location)
    Gets the claim at a given location.
    @Nullable Claim
    getClaimByID(long claimID)
    Gets a claim by its ID.
    @Nullable Long
    getClaimId(@NotNull org.bukkit.Location loc)
    Gets the claim ID of a claimed Location.
    @Nullable String
    getClaimNameById(long claimId)
    Gets the name of a claim by its ID.
    com.google.common.collect.ImmutableSet<Claim>
    getClaimsInArea(org.bukkit.Location pos1, org.bukkit.Location pos2)
    Gets all claims within the given area.
    @NotNull String
    getOwnerName(@NotNull Claim claim)
    Gets the name of the owner of the given claim.
    @Nullable org.bukkit.scoreboard.Team
    getPlayerTeam(@NotNull org.bukkit.entity.Player player)
    Gets the current scoreboard Team of a player.
    @Nullable Integer
    Gets how many claimable chunks a player has left.
    @Nullable Integer
    Gets how many claimable chunks a player has left.
    @Nullable Integer
    Gets how many claimable chunks a team has left.
    boolean
    hasAllProtectionKeys(Claim claim, Collection<org.bukkit.NamespacedKey> keys)
    Checks if a claim has all the specified protections by key.
    boolean
    hasAllProtections(Claim claim, Collection<String> protections)
    Checks if a claim has all the specified protections by string identifiers.
    boolean
    hasAnyProtection(Claim claim, Collection<org.bukkit.NamespacedKey> protections)
    Checks if a claim has any of the provided protections.
    boolean
    hasProtection(Claim claim, org.bukkit.NamespacedKey protection)
    Checks if a claim has a specific protection.
    boolean
    isClaimed(@NotNull org.bukkit.Location loc)
    Checks if a Location is claimed.
    boolean
    isClaimInArea(UUID worldID, int chunkX1, int chunkZ1, int chunkX2, int chunkZ2)
    Checks if there is any claim within the given chunk area.
    boolean
    isPlayerAllowed(@NotNull org.bukkit.entity.Player player, @NotNull Collection<org.bukkit.NamespacedKey> protections, @Nullable Claim claim)
    Checks whether a player is allowed to perform an action in a claim given multiple protection keys.
    boolean
    isPlayerAllowed(@NotNull org.bukkit.entity.Player player, @NotNull Collection<org.bukkit.NamespacedKey> protections, org.bukkit.Location location)
    Checks whether a player is allowed to perform an action at a specific location given multiple protection keys.
    boolean
    isPlayerAllowed(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.NamespacedKey protection, @Nullable Claim claim)
    Checks whether a player is allowed to perform an action in a given claim for a single protection key.
    boolean
    isPlayerAllowed(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.NamespacedKey protection, org.bukkit.Location location)
    Checks whether a player is allowed to perform an action at a location for a single protection key.
    boolean
    isPlayerAllowedInClaim(@Nullable Claim claim, @NotNull org.bukkit.entity.Player player)
    Checks whether a player is allowed to be inside the given claim.
    boolean
    isWorldAllowed(@NotNull org.bukkit.World world)
    Checks whether a player is allowed to create a claim in a specific world.
    Registers multiple Claim objects in the system and persists them to the database.
    boolean
    removeClaimById(long claimId)
    Removes a claim by its ID.
    void
    removePlayerFromWhitelist(long claimID, UUID playerID)
    Removes a player from a claim's whitelist.
    void
    removeProtection(long claimId, @NotNull Protection protection)
    Removes a protection from a claim by ID.
    void
    removeProtection(long claimId, @NotNull org.bukkit.NamespacedKey protection)
    Removes a protection from a claim by ID.
    void
    removeProtection(@NotNull Claim claim, @NotNull Protection protection)
    Removes a protection from a claim by ID.
    void
    removeProtection(@NotNull Claim claim, @NotNull org.bukkit.NamespacedKey protection)
    Removes a protection from a claim by ID.
    void
    setRemainingPlayerClaims(String playerUUID, @Nullable Integer remainingClaims)
    Sets the number of claimable chunks a player has left.
    void
    setRemainingPlayerClaims(UUID playerUUID, @Nullable Integer remainingClaims)
    Sets the number of claimable chunks a player has left.
    void
    setRemainingTeamClaims(String teamName, @Nullable Integer remainingClaims)
    Sets the number of claimable chunks a team has left.
    @Nullable Long
    tryClaimArea(@NotNull Claim claim)
    Attempts to register a Claim instance.
    @Nullable Long
    tryClaimArea(@NotNull ClaimType type, @NotNull String claimOwner, @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2)
    Attempts to create a claim of some ClaimType between two positions.
    @Nullable Long
    tryClaimPlaceholderArea(@NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2)
    Attempts to create a placeholder claim between two positions.
    @Nullable Long
    tryClaimPlayerArea(@NotNull org.bukkit.entity.Player player, @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2)
    Attempts to create a claim for a player between two positions.
    @Nullable Long
    tryClaimServerArea(@NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2)
    Attempts to create a claim owned by the server between two positions.
    @Nullable Long
    tryClaimTeamArea(@NotNull org.bukkit.scoreboard.Team team, @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2)
    Attempts to create a claim for a Team between two positions.
    void
    updateClaimName(long claimId, @NotNull String newName)
    Update the name of a Claim
    void
    updateClaimName(@NotNull Claim claim, @NotNull String newName)
    Update the name of a Claim
    void
    updateClaimOwner(long claimId, @NotNull String newOwnerId)
    Update the owner of a Claim
    void
    updateClaimOwner(@NotNull Claim claim, @NotNull String newOwnerId)
    Update the owner of a Claim
  • Method Details

    • getPlayerTeam

      @Nullable @Nullable org.bukkit.scoreboard.Team getPlayerTeam(@NotNull @NotNull org.bukkit.entity.Player player)
      Gets the current scoreboard Team of a player.
      Parameters:
      player - the player
      Returns:
      the Team the player is in, or null if none
    • getOwnerName

      @Contract(pure=true) @NotNull @NotNull String getOwnerName(@NotNull @NotNull Claim claim)
      Gets the name of the owner of the given claim.
      Parameters:
      claim - the claim to get the owners name from.
      Returns:
      the name of the claim owner
    • isWorldAllowed

      @Contract(pure=true) boolean isWorldAllowed(@NotNull @NotNull org.bukkit.World world)
      Checks whether a player is allowed to create a claim in a specific world.

      Players can bypass this by using the 'buildmc.bypass-claim-dimension-list' permission.

      Parameters:
      world - The World to check
      Returns:
      true if, claims can be created by anyone in the given world.
    • isPlayerAllowedInClaim

      @Contract(pure=true) boolean isPlayerAllowedInClaim(@Nullable @Nullable Claim claim, @NotNull @NotNull org.bukkit.entity.Player player)
      Checks whether a player is allowed to be inside the given claim. If the player is not the owner, not whitelisted or doesn't bypass protections, he won't be allowed.

      This will only check on ClaimType.PLAYER or ClaimType.SERVER.

      Parameters:
      claim - the Claim to check
      player - the player
      Returns:
      true if the player is allowed, otherwise false
    • isPlayerAllowed

      boolean isPlayerAllowed(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Collection<org.bukkit.NamespacedKey> protections, org.bukkit.Location location)
      Checks whether a player is allowed to perform an action at a specific location given multiple protection keys. If all provided protections are false, the player is allowed.
      Parameters:
      player - the player
      protections - the protections to check
      location - the location
      Returns:
      true if the player is allowed, otherwise false
    • isPlayerAllowed

      @Contract(pure=true) boolean isPlayerAllowed(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Collection<org.bukkit.NamespacedKey> protections, @Nullable @Nullable Claim claim)
      Checks whether a player is allowed to perform an action in a claim given multiple protection keys. If all provided protections are false, the player is allowed.
      Parameters:
      player - the player
      protections - the protections to check
      claim - the claim, or null if outside a claim
      Returns:
      true if the player is allowed, otherwise false
    • isPlayerAllowed

      @Contract(pure=true) boolean isPlayerAllowed(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.NamespacedKey protection, @Nullable @Nullable Claim claim)
      Checks whether a player is allowed to perform an action in a given claim for a single protection key.
      Parameters:
      player - the player
      protection - the protection to check
      claim - the claim, or null if outside a claim
      Returns:
      true if the player is allowed, otherwise false
    • isPlayerAllowed

      @Contract(pure=true) boolean isPlayerAllowed(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.NamespacedKey protection, org.bukkit.Location location)
      Checks whether a player is allowed to perform an action at a location for a single protection key.
      Parameters:
      player - the player
      protection - the protection to check
      location - the location
      Returns:
      true if the player is allowed, otherwise false
    • hasAnyProtection

      @Contract(pure=true) boolean hasAnyProtection(Claim claim, Collection<org.bukkit.NamespacedKey> protections)
      Checks if a claim has any of the provided protections.
      Parameters:
      claim - the claim
      protections - the protections (protections) to check
      Returns:
      true if the claim has any of the protections
    • hasProtection

      @Contract(pure=true) boolean hasProtection(Claim claim, org.bukkit.NamespacedKey protection)
      Checks if a claim has a specific protection.
      Parameters:
      claim - the claim
      protection - the protection to check
      Returns:
      true if the claim has the protection
    • hasAllProtections

      @Contract(pure=true) boolean hasAllProtections(Claim claim, Collection<String> protections)
      Checks if a claim has all the specified protections by string identifiers.
      Parameters:
      claim - the claim
      protections - the protections to check
      Returns:
      true if the claim has all the protections
    • hasAllProtectionKeys

      @Contract(pure=true) boolean hasAllProtectionKeys(Claim claim, Collection<org.bukkit.NamespacedKey> keys)
      Checks if a claim has all the specified protections by key.
      Parameters:
      claim - the claim
      keys - the protection keys to check
      Returns:
      true if the claim has all the protections
    • isClaimInArea

      @Contract(pure=true) boolean isClaimInArea(UUID worldID, int chunkX1, int chunkZ1, int chunkX2, int chunkZ2) throws SQLException
      Checks if there is any claim within the given chunk area.
      Parameters:
      worldID - the world UUID
      chunkX1 - first corner chunk X
      chunkZ1 - first corner chunk Z
      chunkX2 - opposite corner chunk X
      chunkZ2 - opposite corner chunk Z
      Returns:
      true if a claim exists in the area
      Throws:
      SQLException - if a database error occurs
    • getClaimsInArea

      @Contract(value="null, _ -> fail; _, null -> fail", pure=true) com.google.common.collect.ImmutableSet<Claim> getClaimsInArea(org.bukkit.Location pos1, org.bukkit.Location pos2) throws SQLException, IllegalArgumentException
      Gets all claims within the given area.
      Parameters:
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      immutable set of claims in the area
      Throws:
      SQLException - if a database error occurs
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world.
    • isClaimed

      @Contract(pure=true) boolean isClaimed(@NotNull @NotNull org.bukkit.Location loc)
      Checks if a Location is claimed.
      Parameters:
      loc - a location
      Returns:
      true if the chunk is claimed
    • getClaimId

      @Contract(pure=true) @Nullable @Nullable Long getClaimId(@NotNull @NotNull org.bukkit.Location loc)
      Gets the claim ID of a claimed Location.
      Parameters:
      loc - a location
      Returns:
      the claim ID, or null if unclaimed
    • getClaimByID

      @Nullable @Nullable Claim getClaimByID(long claimID)
      Gets a claim by its ID.
      Parameters:
      claimID - the claim ID
      Returns:
      the claim, or null if none exists
    • getClaim

      @Nullable @Nullable Claim getClaim(@NotNull @NotNull org.bukkit.Location location)
      Gets the claim at a given location.
      Parameters:
      location - a location
      Returns:
      the claim, or null if unclaimed
    • getAllClaims

      @Contract(pure=true) com.google.common.collect.ImmutableSet<Claim> getAllClaims() throws SQLException
      Retrieves all Claim entries stored in the database.

      Note: This method may be resource-intensive if a large number of claims exist. Consider using it primarily during startup, data synchronization, or administrative tasks.

      Returns:
      An immutable set containing all Claim objects found in the database.
      Throws:
      SQLException - if a database access error occurs while retrieving claims.
    • tryClaimArea

      @Contract("_, _, _, null, _ -> fail; _, _, _, _, null -> fail") @Nullable @Nullable Long tryClaimArea(@NotNull @NotNull ClaimType type, @NotNull @NotNull String claimOwner, @NotNull @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2) throws IllegalArgumentException
      Attempts to create a claim of some ClaimType between two positions.
      Parameters:
      type - the ClaimType of the claim
      claimOwner - the id of the claim owner.

      "Server" for ClaimType.SERVER or ClaimType.PLACEHOLDER.

      The team id for ClaimType.TEAM, or the player UUID for ClaimType.PLAYER.

      claimName - the claim name
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      The ID of the claim. Or null if the claim was not created successfully
      Throws:
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world.
    • tryClaimArea

      @Nullable @Nullable Long tryClaimArea(@NotNull @NotNull Claim claim)
      Attempts to register a Claim instance.
      Parameters:
      claim - The Claim to register. All values of the claim are validated.
      Returns:
      The ID of the claim. Or null if the claim was not registered successfully
    • tryClaimPlayerArea

      @Contract("_, _, null, _ -> fail; _, _, _, null -> fail") @Nullable @Nullable Long tryClaimPlayerArea(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2) throws IllegalArgumentException
      Attempts to create a claim for a player between two positions.
      Parameters:
      player - the player
      claimName - the claim name
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      The ID of the claim. Or null if the claim was not created successfully
      Throws:
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world.
    • tryClaimTeamArea

      @Contract("_, _, null, _ -> fail; _, _, _, null -> fail") @Nullable @Nullable Long tryClaimTeamArea(@NotNull @NotNull org.bukkit.scoreboard.Team team, @NotNull @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2) throws IllegalArgumentException
      Attempts to create a claim for a Team between two positions.
      Parameters:
      team - the team
      claimName - the claim name
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      The ID of the claim. Or null if the claim was not created successfully
      Throws:
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world.
    • tryClaimServerArea

      @Contract("_, null, _ -> fail; _, _, null -> fail") @Nullable @Nullable Long tryClaimServerArea(@NotNull @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2) throws IllegalArgumentException
      Attempts to create a claim owned by the server between two positions.
      Parameters:
      claimName - the claim name
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      The ID of the claim. Or null if the claim was not created successfully
      Throws:
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world
    • tryClaimPlaceholderArea

      @Contract("_, null, _ -> fail; _, _, null -> fail") @Nullable @Nullable Long tryClaimPlaceholderArea(@NotNull @NotNull String claimName, org.bukkit.Location pos1, org.bukkit.Location pos2) throws IllegalArgumentException
      Attempts to create a placeholder claim between two positions.

      A ClaimType.PLACEHOLDER claim may be used to reserve an area temporarily without assigning it to a player, team, or the server.

      Parameters:
      claimName - the claim name
      pos1 - first corner location
      pos2 - opposite corner location
      Returns:
      The ID of the claim. Or null if the claim was not created successfully
      Throws:
      IllegalArgumentException - if any of the Locations are null, or they're not in the same world
    • registerClaims

      Map<Claim,Long> registerClaims(List<Claim> claims) throws SQLException
      Registers multiple Claim objects in the system and persists them to the database.

      This method will first fire a ClaimCreateEvent containing all provided claims. If the event is cancelled by any listener, the registration process is aborted and null is returned.

      If not cancelled, all claims are inserted into the database in a batch operation. The returned map links each Claim to its newly assigned database ID.

      Important: You are responsible for supplying fully initialized Claim instances. This method only handles persistence and cache registration; it does not validate claim boundaries, ownership rules, or overlap constraints.

      Parameters:
      claims - the list of claims to register
      Returns:
      a map of each claim to its generated database ID, or null if the creation event was cancelled
      Throws:
      SQLException - if a database access error occurs during insertion
    • deleteClaims

      void deleteClaims(Collection<Claim> claims) throws SQLException, IllegalArgumentException
      Deletes multiple Claim objects from the system and removes them from the database.

      If the provided collection is null or empty, the method returns immediately without performing any action.

      A ClaimRemoveEvent is fired before deletion, allowing listeners to react to or track the removal. This event is informational and does not prevent deletion.

      Each claim must already have a valid database ID. If any claim has a null ID, an IllegalArgumentException is thrown and no database operation is performed.

      Important: You are responsible for ensuring the claims are valid and should be removed. This method only handles persistence and cache removal.

      Parameters:
      claims - the collection of claims to delete
      Throws:
      SQLException - if a database access error occurs during deletion
      IllegalArgumentException - if any claim does not have a valid ID
    • addPlayerToWhitelist

      void addPlayerToWhitelist(long claimID, UUID playerID)
      Adds a player to a claim's whitelist.
      Parameters:
      claimID - the claim ID
      playerID - the player UUID
    • removePlayerFromWhitelist

      void removePlayerFromWhitelist(long claimID, UUID playerID)
      Removes a player from a claim's whitelist.
      Parameters:
      claimID - the claim ID
      playerID - the player UUID
    • addProtection

      void addProtection(@NotNull @NotNull Claim claim, @NotNull @NotNull org.bukkit.NamespacedKey protection)
      Adds a protection to a claim by ID.
      Parameters:
      claim - the claim
      protection - the protection key
    • addProtection

      void addProtection(@NotNull @NotNull Claim claim, @NotNull @NotNull Protection protection)
      Adds a protection to a claim by ID.
      Parameters:
      claim - the claim
      protection - the protection
    • addProtection

      void addProtection(long claimId, @NotNull @NotNull Protection protection)
      Adds a protection to a claim by ID.
      Parameters:
      claimId - the claim ID
      protection - the protection
    • addProtection

      void addProtection(long claimId, @NotNull @NotNull org.bukkit.NamespacedKey protection)
      Adds a protection to a claim by ID.
      Parameters:
      claimId - the claim ID
      protection - the protection key
    • removeProtection

      void removeProtection(@NotNull @NotNull Claim claim, @NotNull @NotNull org.bukkit.NamespacedKey protection)
      Removes a protection from a claim by ID.
      Parameters:
      claim - the claim
      protection - the protection key
    • removeProtection

      void removeProtection(@NotNull @NotNull Claim claim, @NotNull @NotNull Protection protection)
      Removes a protection from a claim by ID.
      Parameters:
      claim - the claim
      protection - the protection
    • removeProtection

      void removeProtection(long claimId, @NotNull @NotNull Protection protection)
      Removes a protection from a claim by ID.
      Parameters:
      claimId - the claim ID
      protection - the protection
    • removeProtection

      void removeProtection(long claimId, @NotNull @NotNull org.bukkit.NamespacedKey protection)
      Removes a protection from a claim by ID.
      Parameters:
      claimId - the claim ID
      protection - the protection key
    • getClaimNameById

      @Contract(pure=true) @Nullable @Nullable String getClaimNameById(long claimId)
      Gets the name of a claim by its ID.
      Parameters:
      claimId - the claim ID
      Returns:
      the claim name
    • removeClaimById

      boolean removeClaimById(long claimId)
      Removes a claim by its ID.
      Parameters:
      claimId - the claim ID
      Returns:
      true if the claim was removed successfully
    • doesOwnerHaveClaimWithName

      @Contract(pure=true) boolean doesOwnerHaveClaimWithName(String ownerId, String claimName) throws SQLException
      Checks whether the owner already has a claim with the given name.
      Parameters:
      ownerId - the owner identifier
      claimName - the claim name
      Returns:
      true if the owner already has a claim with that name
      Throws:
      SQLException - if a database error occurs
    • getRemainingTeamClaims

      @Contract(pure=true) @Nullable @Nullable Integer getRemainingTeamClaims(String teamName)
      Gets how many claimable chunks a team has left.
      Parameters:
      teamName - the team name
      Returns:
      the number of remaining claims available to the team, or null if no data is available
    • getRemainingPlayerClaims

      @Contract(pure=true) @Nullable @Nullable Integer getRemainingPlayerClaims(String playerUUID)
      Gets how many claimable chunks a player has left.
      Parameters:
      playerUUID - the player's UUID as a string
      Returns:
      the number of remaining claims available to the player, or null if no data is available
    • getRemainingPlayerClaims

      @Contract(pure=true) @Nullable @Nullable Integer getRemainingPlayerClaims(UUID playerUUID)
      Gets how many claimable chunks a player has left.
      Parameters:
      playerUUID - the player's UUID
      Returns:
      the number of remaining claims available to the player, or null if no data is available
    • setRemainingTeamClaims

      void setRemainingTeamClaims(String teamName, @Nullable @Nullable Integer remainingClaims)
      Sets the number of claimable chunks a team has left.

      If remainingClaims is null, the team's remaining claim record is removed.

      Parameters:
      teamName - the team name
      remainingClaims - the new number of remaining claims, or null to remove the record
    • setRemainingPlayerClaims

      void setRemainingPlayerClaims(String playerUUID, @Nullable @Nullable Integer remainingClaims)
      Sets the number of claimable chunks a player has left.

      If remainingClaims is null, the player's remaining claim record is removed.

      Parameters:
      playerUUID - the player's UUID as a string
      remainingClaims - the new number of remaining claims, or null to remove the record
    • setRemainingPlayerClaims

      void setRemainingPlayerClaims(UUID playerUUID, @Nullable @Nullable Integer remainingClaims)
      Sets the number of claimable chunks a player has left.

      If remainingClaims is null, the player's remaining claim record is removed.

      Parameters:
      playerUUID - the player's UUID
      remainingClaims - the new number of remaining claims, or null to remove the record
    • updateClaimName

      void updateClaimName(@NotNull @NotNull Claim claim, @NotNull @NotNull String newName) throws SQLException, IllegalArgumentException
      Update the name of a Claim
      Parameters:
      claim - the claim
      newName - the new claim name
      Throws:
      SQLException - if a database error occurs
      IllegalArgumentException - if the claim has no ID
    • updateClaimName

      void updateClaimName(long claimId, @NotNull @NotNull String newName) throws SQLException
      Update the name of a Claim
      Parameters:
      claimId - the claim ID
      newName - the new claim name
      Throws:
      SQLException - if a database error occurs
    • updateClaimOwner

      void updateClaimOwner(@NotNull @NotNull Claim claim, @NotNull @NotNull String newOwnerId) throws SQLException, IllegalArgumentException
      Update the owner of a Claim
      Parameters:
      claim - the claim
      newOwnerId - the new owner ID (usually a player UUID as string, a team name or "server" depending on the ClaimType)
      Throws:
      SQLException - if a database error occurs
      IllegalArgumentException - if the claim has no ID
    • updateClaimOwner

      void updateClaimOwner(long claimId, @NotNull @NotNull String newOwnerId) throws SQLException
      Update the owner of a Claim
      Parameters:
      claimId - the claim ID
      newOwnerId - the new owner ID (usually a player UUID as string, a team name or "server" depending on the ClaimType)
      Throws:
      SQLException - if a database error occurs