Class GriefPreventionAPI

java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.GriefPrevention.GriefPreventionAPI
All Implemented Interfaces:
IClaimAPI

public class GriefPreventionAPI extends Object implements IClaimAPI
Implementation of the IClaimAPI interface for GriefPrevention.

This class provides methods to interact with GriefPrevention claims, including retrieving a claim at a given location, saving claim data, accessing player claim data, changing claim ownership, and registering claim-related events.

  • Constructor Details

    • GriefPreventionAPI

      public GriefPreventionAPI()
      Default constructor for GriefPreventionAPI.

      No additional initialization is required.

  • Method Details

    • getClaimAt

      public IClaim getClaimAt(org.bukkit.Location location)
      Description copied from interface: IClaimAPI
      Retrieves the claim at the specified Bukkit location.
      Specified by:
      getClaimAt in interface IClaimAPI
      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

      public void saveClaim(IClaim claim)
      Description copied from interface: IClaimAPI
      Saves the specified claim. Implementations should persist any changes to the claim data.
      Specified by:
      saveClaim in interface IClaimAPI
      Parameters:
      claim - the claim to be saved
    • getPlayerData

      public IPlayerData getPlayerData(UUID player)
      Description copied from interface: IClaimAPI
      Retrieves the player data associated with the specified UUID.
      Specified by:
      getPlayerData in interface IClaimAPI
      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

      public void changeClaimOwner(IClaim claim, UUID newOwner)
      Description copied from interface: IClaimAPI
      Changes the owner of the specified claim to the new owner.
      Specified by:
      changeClaimOwner in interface IClaimAPI
      Parameters:
      claim - the claim whose ownership is to be transferred
      newOwner - the UUID of the new owner
    • registerEvents

      public void registerEvents()
      Description copied from interface: IClaimAPI
      Registers any necessary event listeners for claim-related events.
      Specified by:
      registerEvents in interface IClaimAPI