Class GPClaim
java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.GriefPrevention.GPClaim
-
Constructor Summary
ConstructorsConstructorDescriptionGPClaim
(me.ryanhamshire.GriefPrevention.Claim claim) Constructs a new GPClaim that wraps the given GriefPrevention claim. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addManager
(UUID player) Adds the specified player as a manager for this claim.void
addPlayerPermissions
(UUID player, ClaimPermission permission) Adds player permissions to this claim based on the specifiedClaimPermission
.void
Clears all managers from this claim.void
Clears all player permissions for this claim.void
dropPlayerPermissions
(UUID player) Removes all player permissions for the specified player from this claim.int
getArea()
Returns the area of this claim.Returns anIterable
over the child claims of this claim.me.ryanhamshire.GriefPrevention.Claim
getClaim()
Returns the underlying GriefPrevention claim.getId()
Returns the unique identifier of this claim.getOwner()
Returns the UUID of the owner of this claim.Returns the name of the owner of this claim.Returns the parent claim of this claim.org.bukkit.World
getWorld()
Returns the world in which this claim is located.int
getX()
Returns the X-coordinate of the claim's lesser boundary corner.int
getY()
Returns the Y-coordinate of the claim's lesser boundary corner.int
getZ()
Returns 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
Indicates whether 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.
-
Constructor Details
-
GPClaim
public GPClaim(me.ryanhamshire.GriefPrevention.Claim claim) Constructs a new GPClaim that wraps the given GriefPrevention claim.- Parameters:
claim
- the GriefPrevention claim to wrap
-
-
Method Details
-
getClaim
public me.ryanhamshire.GriefPrevention.Claim getClaim()Returns the underlying GriefPrevention claim.- Returns:
- the GriefPrevention
Claim
object
-
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 the claim is an admin claim, false otherwise
-
getChildren
-
isWilderness
public boolean isWilderness()Indicates whether this claim represents wilderness. For GriefPrevention claims, this always returns false.- Specified by:
isWilderness
in interfaceIClaim
- Returns:
- false
-
isSubClaim
public boolean isSubClaim()Determines if this claim is a subclaim.- Specified by:
isSubClaim
in interfaceIClaim
- Returns:
- true if the claim has a parent claim, false otherwise
-
isParentClaim
public boolean isParentClaim()Determines if this claim is a parent claim.- Specified by:
isParentClaim
in interfaceIClaim
- Returns:
- true if the claim does not have a parent, false otherwise
-
getParent
-
dropPlayerPermissions
Removes all player permissions for the specified player from this claim.- Specified by:
dropPlayerPermissions
in interfaceIClaim
- Parameters:
player
- the UUID of the player whose permissions will be removed
-
addPlayerPermissions
Adds player permissions to this claim based on the specifiedClaimPermission
.- Specified by:
addPlayerPermissions
in interfaceIClaim
- Parameters:
player
- the UUID of the player to add permissions forpermission
- theClaimPermission
to add
-
removeManager
Removes the specified player from the list of managers for this claim.- Specified by:
removeManager
in interfaceIClaim
- Parameters:
player
- the UUID of the player to remove as a manager
-
getOwner
-
getOwnerName
Returns the name of the owner of this claim. If the owner is not available, a default server keyword is returned.- Specified by:
getOwnerName
in interfaceIClaim
- Returns:
- the owner's name, or a default value if not available
-
setInheritPermissions
public void setInheritPermissions(boolean inherit) Sets whether this claim should inherit permissions from its parent.- Specified by:
setInheritPermissions
in interfaceIClaim
- Parameters:
inherit
- true if the claim should inherit permissions, false otherwise
-
clearPlayerPermissions
public void clearPlayerPermissions()Clears all player permissions for this claim.- Specified by:
clearPlayerPermissions
in interfaceIClaim
-
addManager
Adds the specified player as a manager for this claim.- Specified by:
addManager
in interfaceIClaim
- Parameters:
player
- the UUID of the player to add as a manager
-
clearManagers
public void clearManagers()Clears all managers from this claim.- Specified by:
clearManagers
in interfaceIClaim
-