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 TypeMethodDescriptionvoidchangeClaimOwner(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.voidRegisters any necessary event listeners for claim-related events.voidSaves the specified claim.
-
Constructor Details
-
GriefPreventionAPI
public GriefPreventionAPI()Default constructor for GriefPreventionAPI.No additional initialization is required.
-
-
Method Details
-
getClaimAt
Description copied from interface:IClaimAPIRetrieves the claim at the specified Bukkit location.- Specified by:
getClaimAtin interfaceIClaimAPI- Parameters:
location- the Bukkit location to check for a claim- Returns:
- an instance of IClaim representing the claim at the given location,
or
nullif no claim exists at that location
-
saveClaim
-
getPlayerData
Description copied from interface:IClaimAPIRetrieves the player data associated with the specified UUID.- Specified by:
getPlayerDatain 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:IClaimAPIChanges the owner of the specified claim to the new owner.- Specified by:
changeClaimOwnerin 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:IClaimAPIRegisters any necessary event listeners for claim-related events.- Specified by:
registerEventsin interfaceIClaimAPI
-