Interface IClaimAPI

All Known Implementing Classes:
GriefDefenderAPI, GriefPreventionAPI, TownyAPIWrapper, WorldGuardAPI

public interface IClaimAPI
The IClaimAPI interface defines the methods for interacting with claims. Implementations of this interface provide functionality to:
  • Retrieve a claim at a specific location.
  • Save or update claim data.
  • Access player-specific claim data.
  • Change the ownership of a claim.
  • Register claim-related events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changeClaimOwner(IClaim claim, UUID newOwner)
    Changes the owner of the specified claim to the new owner.
    getClaimAt(org.bukkit.Location location)
    Retrieves the claim at the specified Bukkit location.
    Retrieves the player data associated with the specified UUID.
    void
    Registers any necessary event listeners for claim-related events.
    void
    Saves the specified claim.
  • Method Details

    • getClaimAt

      IClaim getClaimAt(org.bukkit.Location location)
      Retrieves the claim at the specified Bukkit location.
      Parameters:
      location - the Bukkit location to check for a claim
      Returns:
      an instance of IClaim representing the claim at the given location, or null if no claim exists at that location
    • saveClaim

      void saveClaim(IClaim claim)
      Saves the specified claim. Implementations should persist any changes to the claim data.
      Parameters:
      claim - the claim to be saved
    • getPlayerData

      IPlayerData getPlayerData(UUID player)
      Retrieves the player data associated with the specified UUID.
      Parameters:
      player - the UUID of the player whose claim data is being requested
      Returns:
      an instance of IPlayerData representing the player's claim data
    • changeClaimOwner

      void changeClaimOwner(IClaim claim, UUID newOwner)
      Changes the owner of the specified claim to the new owner.
      Parameters:
      claim - the claim whose ownership is to be transferred
      newOwner - the UUID of the new owner
    • registerEvents

      void registerEvents()
      Registers any necessary event listeners for claim-related events.