Package com.griefdefender.api.claim
Interface Claim.Builder
- Enclosing interface:
Claim
public static interface Claim.Builder
-
Method Summary
Modifier and TypeMethodDescriptionattributes(Set<ClaimAttribute> attributes) The claim attributes.bounds(int x1, int x2, int y1, int y2, int z1, int z2) The position bounds of claim.default Claim.Builderbounds(com.flowpowered.math.vector.Vector3i p1, com.flowpowered.math.vector.Vector3i p2) The position bounds of claim.build()Returns theClaimResult.createLimitRestrictions(boolean checkLimit) Whether to check.invalid reference
PlayerData#getCreateClaimLimit()cuboid(boolean cuboid) Toggles whether this claim is cuboiddenyMessages(boolean allowDeny) Toggles whether this claim allows deny messages to be sent to players.expire(boolean allowExpire) Toggles whether this claim can expire due to no activity.farewell(net.kyori.adventure.text.Component farewell) Sets the farewell message when a player exits the claim.greeting(net.kyori.adventure.text.Component greeting) Sets the greeting message when a player exits the claim.identifier(String identifier) The unique claim identifier.inherit(boolean inherit) Toggles whether this claim is inheriting from parent claim.levelRestrictions(boolean checkLevel) Whether to checkPlayerData.getMinClaimLevel()andPlayerData.getMaxClaimLevel().The owner of claim.The parent claim.requireClaimBlocks(boolean requireClaimBlocks) Sets if this claim requires claim blocks from players.reset()Resets the builder to default settings.resizable(boolean allowResize) Toggles whether this claim is resizable.sizeRestrictions(boolean checkSize) Whether to check for min/max size restrictions.The source creating thisClaim.spawnPos(int x, int y, int z) The spawn position of this claim.default Claim.BuilderspawnPos(com.flowpowered.math.vector.Vector3i pos) The spawn position of this claim.The claim type.The world to add claim into.
-
Method Details
-
bounds
default Claim.Builder bounds(com.flowpowered.math.vector.Vector3i p1, com.flowpowered.math.vector.Vector3i p2) The position bounds of claim.- Parameters:
p1- The lesser boundary positionp2- The greater boundary position- Returns:
- The builder
-
bounds
The position bounds of claim.- Parameters:
x1- The start X-axis positionx2- The end X-axis positiony1- The start Y-axis positiony2- The end Y-axis positionz1- The start Z-axis positionz2- The end Z-axis position- Returns:
- The builder
-
cuboid
Toggles whether this claim is cuboid- Parameters:
cuboid- Whether claim is cuboid- Returns:
- The builder
-
source
The source creating thisClaim.- Parameters:
source- The source creating claim- Returns:
- The builder
-
owner
The owner of claim. Note:does not use owners.invalid reference
ClaimType#ADMIN- Parameters:
ownerUniqueId- The claim owner UUID, if available- Returns:
- The builder
-
identifier
The unique claim identifier. Note: This represents the unique friendly identifier of claim and is different from the display name.- Parameters:
identifier- The unique claim identifier- Returns:
- The builder
-
type
The claim type.- Parameters:
type- The claim type- Returns:
- The builder
-
attributes
The claim attributes.- Parameters:
attributes- The claim attributes- Returns:
- The builder
-
world
The world to add claim into.- Parameters:
world- The world- Returns:
- The builder
-
parent
The parent claim. Note: This is required when adding a child claim to an existing parent.- Parameters:
parent- The parent, if available- Returns:
- The builder
-
denyMessages
Toggles whether this claim allows deny messages to be sent to players. If false, no deny messages will be sent.- Parameters:
allowDeny- Whether to allow sending deny messages to players- Returns:
- The builder
-
expire
Toggles whether this claim can expire due to no activity.- Parameters:
allowExpire- Whether this claim can expire- Returns:
- The builder
-
farewell
Sets the farewell message when a player exits the claim.- Parameters:
farewell- The farewell message- Returns:
- The builder
-
greeting
Sets the greeting message when a player exits the claim.- Parameters:
greeting- The greeting message- Returns:
- The builder
-
inherit
Toggles whether this claim is inheriting from parent claim.- Parameters:
inherit- Whether claim inherits from parent- Returns:
- The builder
-
requireClaimBlocks
Sets if this claim requires claim blocks from players. Note: This is true by default.- Parameters:
requireClaimBlocks- Whether this claim requires claim blocks- Returns:
- The builder
-
resizable
Toggles whether this claim is resizable.- Parameters:
allowResize- Whether claim can be resized.
-
createLimitRestrictions
Whether to check.invalid reference
PlayerData#getCreateClaimLimit()- Parameters:
checkLimit- Whether to check for claim creation restrictions.- Returns:
- The builder
-
levelRestrictions
Whether to checkPlayerData.getMinClaimLevel()andPlayerData.getMaxClaimLevel().- Parameters:
checkLevel- Whether to check for level restrictions.- Returns:
- The builder
-
sizeRestrictions
Whether to check for min/max size restrictions.- Parameters:
checkSize- Whether to check for size restrictions.- Returns:
- The builder
-
spawnPos
The spawn position of this claim.- Parameters:
pos- The spawn position- Returns:
- The builder
-
spawnPos
The spawn position of this claim.- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate- Returns:
- The builder
-
reset
Claim.Builder reset()Resets the builder to default settings.- Returns:
- The builder
-
build
ClaimResult build()Returns theClaimResult.- Returns:
- The claim result
-