Package com.griefdefender.api.claim
Interface ClaimSnapshot.Builder
- Enclosing interface:
ClaimSnapshot
public static interface ClaimSnapshot.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns theClaimResult.claimData(ClaimDataGetter data) The claimClaimDataGetterthe snapshot is based on.creatorClaimUniqueId(UUID claimUniqueId) The claimUUIDthe snapshot is based on.dateCreated(Instant dateCreated) The snapshot creation date.description(net.kyori.adventure.text.Component description) TheComponentdescription of snapshot.The claim to use for snapshot.Gets the set of children claim unique uuid's included in this snapshot.Gets theClaimDataGetter.@Nullable UUIDGets the creator claim'sUUID@Nullable InstantGets the snapshot creation date.@Nullable net.kyori.adventure.text.ComponentGets the snapshot descriptionComponent.getName()Gets the name of the snapshot.Gets the options stored in snapshot.Gets the flag permissions stored in snapshot.booleanWhether children are included in this snapshot.The snapshot name.The claim options.The claim options.permissions(Claim claim) The claim flag permissions.The claim flag permissions.reset()Resets the builder to default settings.
-
Method Details
-
getName
String getName()Gets the name of the snapshot.- Returns:
- The current snapshot name
-
getDescription
@Nullable net.kyori.adventure.text.Component getDescription()Gets the snapshot descriptionComponent.- Returns:
- The snapshot description, if available
-
getDateCreated
@Nullable Instant getDateCreated()Gets the snapshot creation date.- Returns:
- The snapshot creation date
-
getCreatorClaimUniqueId
@Nullable UUID getCreatorClaimUniqueId()Gets the creator claim'sUUID- Returns:
- The creator claim unique identifer, if available
-
getClaimData
ClaimDataGetter getClaimData()Gets theClaimDataGetter.- Returns:
- The claim data
-
getChildrenUniqueIds
Gets the set of children claim unique uuid's included in this snapshot.- Returns:
- The set of children uuid's or empty snapshot if none
-
includeChildren
boolean includeChildren()Whether children are included in this snapshot.- Returns:
- True if included, false if not
-
getPermissions
Gets the flag permissions stored in snapshot. Note: Key is a context containing permission:value Note: Value is a set of contexts attached to permission- Returns:
- The mutable permission map
-
getOptions
Gets the options stored in snapshot. Note: Key is a context containing option:value Note: Value is a set of contexts attached to permission- Returns:
- The mutable option map
-
from
The claim to use for snapshot. Note: This will copy claim data, economy data, permissions, and options. It will not set theinvalid reference
invalid input: '@param claim The claim @param children True to include children with snapshot, false if not @return The builder' -
name
The snapshot name.- Parameters:
name- The snapshot name- Returns:
- The builder
-
dateCreated
The snapshot creation date. Note: If not set, date will be set on build.- Parameters:
dateCreated- The snapshot creation date- Returns:
- The builder
-
description
TheComponentdescription of snapshot.- Parameters:
description- The description- Returns:
- The snapshot description
-
creatorClaimUniqueId
The claimUUIDthe snapshot is based on. Note: If apply is used without aClaim, it will apply to the claimUUIDset here.- Parameters:
claimUniqueId- The claim uuid- Returns:
- The builder
-
claimData
The claimClaimDataGetterthe snapshot is based on.- Parameters:
data- The claim data- Returns:
- The builder
-
permissions
The claim flag permissions. Note: Key is a context containing permission:value Note: Value is a set of contexts attached to permission- Parameters:
claim- The claim to copy permissions from- Returns:
- The builder
-
permissions
The claim flag permissions. Note: Key is a context containing permission:value Note: Value is a set of contexts attached to permission- Returns:
- The builder
-
options
The claim options. Note: Key is a context containing option:value Note: Value is a set of contexts attached to option- Parameters:
claim- The claim to copy options from- Returns:
- The builder
-
options
The claim options. Note: Key is a context containing option:value Note: Value is a set of contexts attached to option- Returns:
- The builder
-
reset
ClaimSnapshot.Builder reset()Resets the builder to default settings.- Returns:
- The builder
-
build
ClaimSnapshot build()Returns theClaimResult.- Returns:
- The created snapshot
-