Package com.griefdefender.api.claim
Interface ClaimSnapshot
public interface ClaimSnapshot
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanApplies snapshot to specified claim.booleanapply(Claim claim, SnapshotApplySettings applySettings) Applies snapshot to specified claim.default booleanApplies snapshot to creator claim.booleanapplyToCreator(boolean includeChildren) Applies snapshot to creator claim.booleanapplyToCreator(SnapshotApplySettings applySettings, boolean includeChildren) Applies snapshot to creator claim.static ClaimSnapshot.Builderbuilder()Gets a new claim snapshot builder instance forClaimSnapshot.Builder.Gets an immutable map of children snapshots.Gets aClaimDataGetter.@Nullable UUIDGets creator claim'sUUIDGets the creation date of snapshot.@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.
-
Method Details
-
getName
String getName()Gets the name of the snapshot.- Returns:
- The snapshot name
-
getDateCreated
Instant getDateCreated()Gets the creation date of snapshot.- Returns:
- The snapshot creation date
-
getDescription
@Nullable net.kyori.adventure.text.Component getDescription()Gets the snapshot descriptionComponent.- Returns:
- The snapshot description, if available
-
getCreatorUniqueId
@Nullable UUID getCreatorUniqueId()Gets creator claim'sUUID- Returns:
- The creator claim unique identifer
-
getClaimData
ClaimDataGetter getClaimData()Gets aClaimDataGetter.- Returns:
- The claim data
-
getChildrenSnapshots
Map<UUID,ClaimSnapshot> getChildrenSnapshots()Gets an immutable map of children snapshots.- Returns:
- The immutable map of children snapshots
-
getPermissions
Gets the flag permissions stored in snapshot. Note: Key is identifier of permission holder Note: Value is a map with key containing permission:value and value containing set of contexts attached to permission- Returns:
- The immutable permission map
-
getOptions
Gets the options stored in snapshot. Note: Key is identifier of permission holder Note: Value is a map with key containing option:value and value containing set of contexts attached to option- Returns:
- The immutable option map
-
applyToCreator
default boolean applyToCreator()Applies snapshot to creator claim.
Note: This will automatically apply all children snapshots that are part of this snapshot.- Returns:
- If snapshot apply was successful, false if not
-
applyToCreator
boolean applyToCreator(boolean includeChildren) Applies snapshot to creator claim.- Parameters:
includeChildren- True to include children snapshots, false if not- Returns:
- If snapshot apply was successful, false if not
-
applyToCreator
Applies snapshot to creator claim.- Parameters:
includeChildren- True to include children snapshots, false if not- Returns:
- If snapshot apply was successful, false if not
-
apply
Applies snapshot to specified claim.- Returns:
- If snapshot apply was successful, false if not
-
apply
Applies snapshot to specified claim.- Returns:
- If snapshot apply was successful, false if not
-
builder
Gets a new claim snapshot builder instance forClaimSnapshot.Builder.- Returns:
- A new claim snapshot builder instance
-