Interface ClaimSnapshot


public interface ClaimSnapshot
  • 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 description Component.
      Returns:
      The snapshot description, if available
    • getCreatorUniqueId

      @Nullable UUID getCreatorUniqueId()
      Gets creator claim's UUID
      Returns:
      The creator claim unique identifer
    • getClaimData

      ClaimDataGetter getClaimData()
      Returns:
      The claim data
    • getChildrenSnapshots

      Map<UUID,ClaimSnapshot> getChildrenSnapshots()
      Gets an immutable map of children snapshots.
      Returns:
      The immutable map of children snapshots
    • getPermissions

      Map<String,Map<Set<Context>,Map<String,Boolean>>> 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

      boolean applyToCreator(SnapshotApplySettings applySettings, 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
    • apply

      boolean apply(Claim claim)
      Applies snapshot to specified claim.
      Returns:
      If snapshot apply was successful, false if not
    • apply

      boolean apply(Claim claim, SnapshotApplySettings applySettings)
      Applies snapshot to specified claim.
      Returns:
      If snapshot apply was successful, false if not
    • builder

      static ClaimSnapshot.Builder builder()
      Gets a new claim snapshot builder instance for ClaimSnapshot.Builder.
      Returns:
      A new claim snapshot builder instance