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 TypeMethodDescriptionvoid
addManager
(UUID player) Adds the specified player as a manager for this claim.void
addPlayerPermissions
(UUID player, ClaimPermission permission) Grants a specific permission to a player for this claim.void
Clears all managers from this claim.void
Clears all player-specific permissions from this claim.void
dropPlayerPermissions
(UUID player) Removes all permissions for the specified player from this claim.int
getArea()
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.World
getWorld()
Retrieves the BukkitWorld
in which this claim is located.int
getX()
Retrieves the X coordinate of this claim's location.int
getY()
Retrieves the Y coordinate of this claim's location.int
getZ()
Retrieves the Z coordinate of this claim's location.boolean
Determines if this claim is an admin claim.boolean
Determines if this claim is a parent claim.boolean
Determines if this claim is a subclaim.boolean
Checks if this claim represents wilderness.void
removeManager
(UUID player) Removes the specified player from the list of managers for this claim.void
setInheritPermissions
(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 BukkitWorld
in 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:
true
if this is an admin claim,false
otherwise
-
getChildren
-
isWilderness
boolean isWilderness()Checks if this claim represents wilderness.- Returns:
true
if this is a wilderness claim,false
otherwise
-
isSubClaim
boolean isSubClaim()Determines if this claim is a subclaim.- Returns:
true
if this is a subclaim,false
otherwise
-
isParentClaim
boolean isParentClaim()Determines if this claim is a parent claim.- Returns:
true
if this is a parent claim,false
otherwise
-
getParent
IClaim getParent()Retrieves the parent claim of this claim, if any.- Returns:
- the parent claim, or
null
if 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
- theClaimPermission
to 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
-true
to enable inheritance;false
to disable it
-