Package com.griefdefender.api.claim
Interface ClaimManager
public interface ClaimManager
Used to manage one or more
Claim's in a world.-
Method Summary
Modifier and TypeMethodDescriptiondefault ClaimResultdeleteClaim(Claim claim) Deletes aClaimfrom the managed world.deleteClaim(Claim claim, boolean deleteChildren) Deletes aClaimfrom the managed world.Gets an unmodifiable map view of chunk hashes toClaim's.getClaimAt(int x, int y, int z) Gets theClaimat specified position.getClaimAt(com.flowpowered.math.vector.Vector3i pos) Gets theClaimat specified position.@Nullable ClaimgetClaimByUUID(UUID claimUniqueId) getClaimsByDisplayName(String name) Gets a list ofClaim's with specified name.getPlayerClaims(UUID playerUniqueId) Gets the wilderness claim of this manager's world.Gets the managedUUID.
-
Method Details
-
getWildernessClaim
Claim getWildernessClaim()Gets the wilderness claim of this manager's world.- Returns:
- The wilderness claim
-
getClaimAt
Gets theClaimat specified position.- Parameters:
pos- The pos to check- Returns:
- The claim if available, otherwise returns the wilderness claim if none were found.
-
getClaimAt
Gets theClaimat specified position.- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate- Returns:
- The claim if available, otherwise returns the wilderness claim if none were found.
-
getClaimByUUID
- Parameters:
claimUniqueId- The claim UUID to search for- Returns:
- The claim, if available
-
getClaimsByDisplayName
Gets a list ofClaim's with specified name.- Parameters:
name- The claim name to search for- Returns:
- The list of claims, empty list if none were found
-
getPlayerClaims
Gets a set view of playerClaim's for specifiedUUID. Note: This will return an empty list if player has no claims.- Parameters:
playerUniqueId- The player UUID- Returns:
- An unmodifiable set view of claims, empty list if none were found
-
getWorldClaims
Gets a set view all worldClaim's for specifiedUUID. Note: This will return an empty list if no world claims are found.- Returns:
- An unmodifiable set view of world claims, empty list if none were found
-
getChunksToClaimsMap
Gets an unmodifiable map view of chunk hashes toClaim's.- Returns:
- An unmodifiable map view of chunk hashes to claims, empty map if none exist.
-
deleteClaim
Deletes aClaimfrom the managed world.- Parameters:
claim- The claim to delete- Returns:
- The claim result
-
deleteClaim
Deletes aClaimfrom the managed world. Note: If children are not deleted, they will be moved to parent claim if one exists. If no parent exists, they will simply be moved to wilderness.- Parameters:
claim- The claim to deletedeleteChildren- Whether to delete children- Returns:
- The claim result
-
getWorldId
UUID getWorldId()Gets the managedUUID.- Returns:
- The managed world uuid
-