Class TownyClaim
java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.Towny.TownyClaim
-
Constructor Summary
ConstructorsConstructorDescriptionTownyClaim
(org.bukkit.Location location) Constructs a new TownyClaim using the given location. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addManager
(UUID player) Adds a manager to this claim.void
addPlayerPermissions
(UUID player, ClaimPermission permission) Adds a specific permission for the given player on this claim.void
Clears all managers from this claim.void
Clears all player-specific permissions on this claim.void
dropPlayerPermissions
(UUID player) Drops any player-specific permissions for the given player on this claim.int
getArea()
Returns the area of the Towny claim.Returns an iterable over the child claims.getId()
Returns a unique identifier for this Towny claim.getOwner()
Returns the owner of the claim as a UUID.Returns the name of the claim's owner.Returns the parent claim of this claim.org.bukkit.World
getWorld()
Returns the world where this claim is located.int
getX()
Returns the X-coordinate of the claim's location.int
getY()
Returns the Y-coordinate of the claim's location.int
getZ()
Returns the Z-coordinate of the claim's location.boolean
Indicates whether this claim is an admin claim.boolean
Indicates whether this claim is a parent claim.boolean
Indicates whether this claim is a subclaim.boolean
Indicates whether this claim represents wilderness.void
removeManager
(UUID player) Removes the specified manager from this claim.void
setInheritPermissions
(boolean inherit) Sets whether this claim should inherit permissions from its parent.
-
Constructor Details
-
TownyClaim
public TownyClaim(org.bukkit.Location location) Constructs a new TownyClaim using the given location.- Parameters:
location
- the Bukkit Location representing the Towny plot
-
-
Method Details
-
getId
-
getArea
-
getWorld
-
getX
-
getY
-
getZ
-
isAdminClaim
public boolean isAdminClaim()Indicates whether this claim is an admin claim.Towny does not designate "admin claims" in the same manner.
- Specified by:
isAdminClaim
in interfaceIClaim
- Returns:
false
always
-
getChildren
Returns an iterable over the child claims.Towny plots do not have child claims.
- Specified by:
getChildren
in interfaceIClaim
- Returns:
- an empty list
-
isWilderness
public boolean isWilderness()Indicates whether this claim represents wilderness.For simplicity, a Towny claim is never considered wilderness.
- Specified by:
isWilderness
in interfaceIClaim
- Returns:
false
always
-
isSubClaim
public boolean isSubClaim()Indicates whether this claim is a subclaim.Not applicable for Towny.
- Specified by:
isSubClaim
in interfaceIClaim
- Returns:
false
always
-
isParentClaim
public boolean isParentClaim()Indicates whether this claim is a parent claim.All Towny claims are treated as parent claims.
- Specified by:
isParentClaim
in interfaceIClaim
- Returns:
true
always
-
getParent
-
dropPlayerPermissions
Drops any player-specific permissions for the given player on this claim.Not applicable for Towny.
- Specified by:
dropPlayerPermissions
in interfaceIClaim
- Parameters:
player
- the UUID of the player
-
addPlayerPermissions
Adds a specific permission for the given player on this claim.Not applicable for Towny.
- Specified by:
addPlayerPermissions
in interfaceIClaim
- Parameters:
player
- the UUID of the playerpermission
- the permission to add
-
clearPlayerPermissions
public void clearPlayerPermissions()Clears all player-specific permissions on this claim.Not applicable for Towny.
- Specified by:
clearPlayerPermissions
in interfaceIClaim
-
removeManager
Removes the specified manager from this claim.Not applicable for Towny.
- Specified by:
removeManager
in interfaceIClaim
- Parameters:
player
- the UUID of the manager to remove
-
addManager
Adds a manager to this claim.Not applicable for Towny.
- Specified by:
addManager
in interfaceIClaim
- Parameters:
player
- the UUID of the manager to add
-
clearManagers
public void clearManagers()Clears all managers from this claim.Not applicable for Towny.
- Specified by:
clearManagers
in interfaceIClaim
-
getOwner
-
getOwnerName
Returns the name of the claim's owner.- Specified by:
getOwnerName
in interfaceIClaim
- Returns:
- the owner name as a String
-
setInheritPermissions
public void setInheritPermissions(boolean inherit) Sets whether this claim should inherit permissions from its parent.Not applicable for Towny.
- Specified by:
setInheritPermissions
in interfaceIClaim
- Parameters:
inherit
-true
to inherit permissions,false
otherwise
-