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 TypeMethodDescriptionvoid
addManager
(UUID player) Adds a manager to this claim.void
addPlayerPermissions
(UUID player, ClaimPermission permission) Adds a specific permission for a player to this claim.void
Clears all managers from this claim.void
Clears all player permissions from this claim.void
dropPlayerPermissions
(UUID player) Drops all player permissions for the specified player in this claim.int
getArea()
Calculates the area of the claim.Returns an iterable over the child claims.com.griefdefender.api.claim.Claim
getClaim()
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.World
getWorld()
Retrieves the BukkitWorld
where the claim is located.int
getX()
Gets the X coordinate of the claim's lesser boundary corner.int
getY()
Gets the Y coordinate of the claim's lesser boundary corner.int
getZ()
Gets the Z coordinate of the claim's lesser boundary corner.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 a manager from this claim.void
setInheritPermissions
(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:
isAdminClaim
in interfaceIClaim
- Returns:
true
if this claim is an admin claim,false
otherwise
-
getChildren
-
isWilderness
public boolean isWilderness()Checks if this claim represents wilderness.- Specified by:
isWilderness
in interfaceIClaim
- Returns:
true
if this claim is wilderness,false
otherwise
-
isSubClaim
public boolean isSubClaim()Determines if this claim is a subclaim.- Specified by:
isSubClaim
in interfaceIClaim
- Returns:
true
if this claim has a non-wilderness parent;false
otherwise
-
isParentClaim
public boolean isParentClaim()Determines if this claim is a parent claim.- Specified by:
isParentClaim
in interfaceIClaim
- Returns:
true
if 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:
dropPlayerPermissions
in 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:
addPlayerPermissions
in interfaceIClaim
- Parameters:
player
- the UUID of the player to grant permission topermission
- theClaimPermission
to grant
-
clearPlayerPermissions
public void clearPlayerPermissions()Clears all player permissions from this claim.- Specified by:
clearPlayerPermissions
in interfaceIClaim
-
removeManager
Removes a manager from this claim.Not supported in GriefDefender.
- Specified by:
removeManager
in interfaceIClaim
- Parameters:
player
- the UUID of the manager to remove
-
addManager
Adds a manager to this claim.Not supported in GriefDefender.
- 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 supported in GriefDefender.
- Specified by:
clearManagers
in interfaceIClaim
-
getOwner
-
getOwnerName
Retrieves the name of the claim's owner.- Specified by:
getOwnerName
in 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:
setInheritPermissions
in interfaceIClaim
- Parameters:
inherit
-true
to inherit permissions,false
otherwise
-