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 TypeMethodDescriptionvoidaddManager(UUID player) Adds a manager to this claim.voidaddPlayerPermissions(UUID player, ClaimPermission permission) Adds a specific permission for the given player on this claim.voidClears all managers from this claim.voidClears all player-specific permissions on this claim.voiddropPlayerPermissions(UUID player) Drops any player-specific permissions for the given player on this claim.intgetArea()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.WorldgetWorld()Returns the world where this claim is located.intgetX()Returns the X-coordinate of the claim's location.intgetY()Returns the Y-coordinate of the claim's location.intgetZ()Returns the Z-coordinate of the claim's location.booleanIndicates whether this claim is an admin claim.booleanIndicates whether this claim is a parent claim.booleanIndicates whether this claim is a subclaim.booleanIndicates whether this claim represents wilderness.voidremoveManager(UUID player) Removes the specified manager from this claim.voidsetInheritPermissions(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:
isAdminClaimin interfaceIClaim- Returns:
falsealways
-
getChildren
Returns an iterable over the child claims.Towny plots do not have child claims.
- Specified by:
getChildrenin 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:
isWildernessin interfaceIClaim- Returns:
falsealways
-
isSubClaim
public boolean isSubClaim()Indicates whether this claim is a subclaim.Not applicable for Towny.
- Specified by:
isSubClaimin interfaceIClaim- Returns:
falsealways
-
isParentClaim
public boolean isParentClaim()Indicates whether this claim is a parent claim.All Towny claims are treated as parent claims.
- Specified by:
isParentClaimin interfaceIClaim- Returns:
truealways
-
getParent
-
dropPlayerPermissions
Drops any player-specific permissions for the given player on this claim.Not applicable for Towny.
- Specified by:
dropPlayerPermissionsin 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:
addPlayerPermissionsin 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:
clearPlayerPermissionsin interfaceIClaim
-
removeManager
Removes the specified manager from this claim.Not applicable for Towny.
- Specified by:
removeManagerin interfaceIClaim- Parameters:
player- the UUID of the manager to remove
-
addManager
Adds a manager to this claim.Not applicable for Towny.
- Specified by:
addManagerin 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:
clearManagersin interfaceIClaim
-
getOwner
-
getOwnerName
Returns the name of the claim's owner.- Specified by:
getOwnerNamein 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:
setInheritPermissionsin interfaceIClaim- Parameters:
inherit-trueto inherit permissions,falseotherwise
-