Class GriefPreventionAPI
java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.GriefPrevention.GriefPreventionAPI
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.getPlayerData
(UUID player) Retrieves the player data associated with the specified UUID.void
Registers any necessary event listeners for claim-related events.void
Saves the specified claim.
-
Constructor Details
-
GriefPreventionAPI
public GriefPreventionAPI()Default constructor for GriefPreventionAPI.No additional initialization is required.
-
-
Method Details
-
getClaimAt
Description copied from interface:IClaimAPI
Retrieves the claim at the specified Bukkit location.- Specified by:
getClaimAt
in interfaceIClaimAPI
- 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
-
getPlayerData
Description copied from interface:IClaimAPI
Retrieves the player data associated with the specified UUID.- Specified by:
getPlayerData
in interfaceIClaimAPI
- 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
Description copied from interface:IClaimAPI
Changes the owner of the specified claim to the new owner.- Specified by:
changeClaimOwner
in interfaceIClaimAPI
- Parameters:
claim
- the claim whose ownership is to be transferrednewOwner
- 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 interfaceIClaimAPI
-