Interface IClaim
- All Known Implementing Classes:
GDClaim,GPClaim,TownyClaim,WGClaim
public interface IClaim
Represents a claim in the RealEstate plugin.
An IClaim provides methods to access details about a claim, such as its location, area, ownership, and permissions management.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddManager(UUID player) Adds the specified player as a manager for this claim.voidaddPlayerPermissions(UUID player, ClaimPermission permission) Grants a specific permission to a player for this claim.voidClears all managers from this claim.voidClears all player-specific permissions from this claim.voiddropPlayerPermissions(UUID player) Removes all permissions for the specified player from this claim.intgetArea()Retrieves the area of this claim in blocks.Retrieves an iterable collection of child claims.getId()Retrieves the unique identifier for this claim.getOwner()Retrieves the owner of this claim.Retrieves the name of the claim's owner.Retrieves the parent claim of this claim, if any.org.bukkit.WorldgetWorld()Retrieves the BukkitWorldin which this claim is located.intgetX()Retrieves the X coordinate of this claim's location.intgetY()Retrieves the Y coordinate of this claim's location.intgetZ()Retrieves the Z coordinate of this claim's location.booleanDetermines if this claim is an admin claim.booleanDetermines if this claim is a parent claim.booleanDetermines if this claim is a subclaim.booleanChecks if this claim represents wilderness.voidremoveManager(UUID player) Removes the specified player from the list of managers for this claim.voidsetInheritPermissions(boolean inherit) Sets whether this claim should inherit permissions from its parent claim.
-
Method Details
-
getId
String getId()Retrieves the unique identifier for this claim.- Returns:
- the claim's unique ID as a String
-
getArea
int getArea()Retrieves the area of this claim in blocks.- Returns:
- the area of the claim
-
getWorld
org.bukkit.World getWorld()Retrieves the BukkitWorldin which this claim is located.- Returns:
- the world of the claim
-
getX
int getX()Retrieves the X coordinate of this claim's location.- Returns:
- the X coordinate
-
getY
int getY()Retrieves the Y coordinate of this claim's location.- Returns:
- the Y coordinate
-
getZ
int getZ()Retrieves the Z coordinate of this claim's location.- Returns:
- the Z coordinate
-
isAdminClaim
boolean isAdminClaim()Determines if this claim is an admin claim.- Returns:
trueif this is an admin claim,falseotherwise
-
getChildren
-
isWilderness
boolean isWilderness()Checks if this claim represents wilderness.- Returns:
trueif this is a wilderness claim,falseotherwise
-
isSubClaim
boolean isSubClaim()Determines if this claim is a subclaim.- Returns:
trueif this is a subclaim,falseotherwise
-
isParentClaim
boolean isParentClaim()Determines if this claim is a parent claim.- Returns:
trueif this is a parent claim,falseotherwise
-
getParent
IClaim getParent()Retrieves the parent claim of this claim, if any.- Returns:
- the parent claim, or
nullif there is no parent
-
dropPlayerPermissions
Removes all permissions for the specified player from this claim.- Parameters:
player- the UUID of the player whose permissions should be removed
-
addPlayerPermissions
Grants a specific permission to a player for this claim.- Parameters:
player- the UUID of the player to grant permission topermission- theClaimPermissionto grant
-
clearPlayerPermissions
void clearPlayerPermissions()Clears all player-specific permissions from this claim. -
removeManager
Removes the specified player from the list of managers for this claim.- Parameters:
player- the UUID of the manager to remove
-
addManager
Adds the specified player as a manager for this claim.- Parameters:
player- the UUID of the manager to add
-
clearManagers
void clearManagers()Clears all managers from this claim. -
getOwner
-
getOwnerName
String getOwnerName()Retrieves the name of the claim's owner.- Returns:
- the owner's name as a String
-
setInheritPermissions
void setInheritPermissions(boolean inherit) Sets whether this claim should inherit permissions from its parent claim.- Parameters:
inherit-trueto enable inheritance;falseto disable it
-