Interface ClaimSnapshot.Builder

Enclosing interface:
ClaimSnapshot

public static interface ClaimSnapshot.Builder
  • 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 description Component.
      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's UUID
      Returns:
      The creator claim unique identifer, if available
    • getClaimData

      ClaimDataGetter getClaimData()
      Gets the ClaimDataGetter.
      Returns:
      The claim data
    • getChildrenUniqueIds

      Set<UUID> 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

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

      ClaimSnapshot.Builder from(Claim claim, boolean children)
      The claim to use for snapshot. Note: This will copy claim data, economy data, permissions, and options. It will not set the
      invalid 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

      ClaimSnapshot.Builder dateCreated(Instant 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

      ClaimSnapshot.Builder description(net.kyori.adventure.text.Component description)
      The Component description of snapshot.
      Parameters:
      description - The description
      Returns:
      The snapshot description
    • creatorClaimUniqueId

      ClaimSnapshot.Builder creatorClaimUniqueId(UUID claimUniqueId)
      The claim UUID the snapshot is based on. Note: If apply is used without a Claim, it will apply to the claim UUID set here.
      Parameters:
      claimUniqueId - The claim uuid
      Returns:
      The builder
    • claimData

      The claim ClaimDataGetter the snapshot is based on.
      Parameters:
      data - The claim data
      Returns:
      The builder
    • permissions

      ClaimSnapshot.Builder permissions(Claim claim)
      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

      ClaimSnapshot.Builder options(Claim claim)
      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

      Resets the builder to default settings.
      Returns:
      The builder
    • build

      ClaimSnapshot build()
      Returns the ClaimResult.
      Returns:
      The created snapshot