Class GDClaim
java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.GriefDefender.GDClaim
-
Constructor Summary
ConstructorsConstructorDescriptionGDClaim(com.griefdefender.api.claim.Claim claim) Constructs a new GDClaim that wraps the given GriefDefender claim. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddManager(UUID player) Adds a manager to this claim.voidaddPlayerPermissions(UUID player, ClaimPermission permission) Adds a specific permission for a player to this claim.voidClears all managers from this claim.voidClears all player permissions from this claim.voiddropPlayerPermissions(UUID player) Drops all player permissions for the specified player in this claim.intgetArea()Calculates the area of the claim.Returns an iterable over the child claims.com.griefdefender.api.claim.ClaimgetClaim()Returns the underlying GriefDefender claim.getId()Gets the unique identifier for this claim.getOwner()Retrieves the owner of the claim.Retrieves the name of the claim's owner.Retrieves the parent claim of this claim, if any.org.bukkit.WorldgetWorld()Retrieves the BukkitWorldwhere the claim is located.intgetX()Gets the X coordinate of the claim's lesser boundary corner.intgetY()Gets the Y coordinate of the claim's lesser boundary corner.intgetZ()Gets the Z coordinate of the claim's lesser boundary corner.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 a manager from this claim.voidsetInheritPermissions(boolean inherit) Sets whether the claim should inherit permissions from its parent claim.
-
Constructor Details
-
GDClaim
public GDClaim(com.griefdefender.api.claim.Claim claim) Constructs a new GDClaim that wraps the given GriefDefender claim.- Parameters:
claim- the GriefDefender claim to wrap
-
-
Method Details
-
getClaim
public com.griefdefender.api.claim.Claim getClaim()Returns the underlying GriefDefender claim.- Returns:
- the wrapped GriefDefender
Claim
-
getId
-
getArea
-
getWorld
-
getX
-
getY
-
getZ
-
isAdminClaim
public boolean isAdminClaim()Determines if this claim is an admin claim.- Specified by:
isAdminClaimin interfaceIClaim- Returns:
trueif this claim is an admin claim,falseotherwise
-
getChildren
-
isWilderness
public boolean isWilderness()Checks if this claim represents wilderness.- Specified by:
isWildernessin interfaceIClaim- Returns:
trueif this claim is wilderness,falseotherwise
-
isSubClaim
public boolean isSubClaim()Determines if this claim is a subclaim.- Specified by:
isSubClaimin interfaceIClaim- Returns:
trueif this claim has a non-wilderness parent;falseotherwise
-
isParentClaim
public boolean isParentClaim()Determines if this claim is a parent claim.- Specified by:
isParentClaimin interfaceIClaim- Returns:
trueif this claim has no parent or its parent is wilderness
-
getParent
-
dropPlayerPermissions
Drops all player permissions for the specified player in this claim.- Specified by:
dropPlayerPermissionsin interfaceIClaim- Parameters:
player- the UUID of the player whose permissions should be dropped
-
addPlayerPermissions
Adds a specific permission for a player to this claim.- Specified by:
addPlayerPermissionsin interfaceIClaim- Parameters:
player- the UUID of the player to grant permission topermission- theClaimPermissionto grant
-
clearPlayerPermissions
public void clearPlayerPermissions()Clears all player permissions from this claim.- Specified by:
clearPlayerPermissionsin interfaceIClaim
-
removeManager
Removes a manager from this claim.Not supported in GriefDefender.
- Specified by:
removeManagerin interfaceIClaim- Parameters:
player- the UUID of the manager to remove
-
addManager
Adds a manager to this claim.Not supported in GriefDefender.
- Specified by:
addManagerin interfaceIClaim- Parameters:
player- the UUID of the manager to add
-
clearManagers
public void clearManagers()Clears all managers from this claim.Not supported in GriefDefender.
- Specified by:
clearManagersin interfaceIClaim
-
getOwner
-
getOwnerName
Retrieves the name of the claim's owner.- Specified by:
getOwnerNamein interfaceIClaim- Returns:
- the owner's name as provided by GriefDefender
-
setInheritPermissions
public void setInheritPermissions(boolean inherit) Sets whether the claim should inherit permissions from its parent claim.- Specified by:
setInheritPermissionsin interfaceIClaim- Parameters:
inherit-trueto inherit permissions,falseotherwise
-