Interface EconomyData.Builder

Enclosing interface:
EconomyData

public static interface EconomyData.Builder
  • Method Details

    • getRentSignPos

      com.flowpowered.math.vector.Vector3i getRentSignPos()
      Gets the rent sign position.
      Returns:
      The rent sign position, if available
    • getSaleSignPos

      com.flowpowered.math.vector.Vector3i getSaleSignPos()
      Gets the sale sign position.
      Returns:
      The sale sign position, if available
    • getPaymentType

      PaymentType getPaymentType()
      Gets the PaymentType.
      Returns:
      The payment type
    • isForSale

      boolean isForSale()
      Gets whether claim is for sale.
      Returns:
      whether claim is for sale
    • isForRent

      boolean isForRent()
      Gets whether claim is for rent.
      Returns:
      whether claim is for rent
    • getRentBreakAbility

      boolean getRentBreakAbility()
      Gets rental break ability.
      Returns:
      Whether renters or rental trusted have ability to break owner blocks.
    • getRentRate

      double getRentRate()
      Gets the rent rate of Claim.
      Returns:
      The rent rate, or -1 if not set.
    • getRentStripNbt

      boolean getRentStripNbt()
      Gets whether a rented claim will strip all block NBT data on restore. Note: This is only used when a rented claim is restored on rental end.
      Returns:
      Whether NBT will be stripped on restore
    • getRentEndDate

      @Nullable Instant getRentEndDate()
      Gets the rent end date. Note: If not set, the claim may be rented as long as needed.
      Returns:
      The rent end date, if available
    • getSaleEndDate

      @Nullable Instant getSaleEndDate()
      Gets the sale end date of claim.
      Returns:
      The sale end date, if available
    • getSalePrice

      double getSalePrice()
      Gets the sale price of Claim.
      Returns:
      The sale price, or -1 if not set.
    • getRentMinTime

      int getRentMinTime()
      Gets the minimum rent time.
      Returns:
      The minimum rent time
    • getRentMaxTime

      int getRentMaxTime()
      Gets the maximum rent time.
      Returns:
      The maximum rent time
    • rentBreakAbility

      EconomyData.Builder rentBreakAbility(boolean breakAbility)
      Sets whether renters or rental trusted users have the ability to break owner blocks in Claim.
      Parameters:
      breakAbility -
      Returns:
      The builder
    • paymentType

      EconomyData.Builder paymentType(PaymentType type)
      Sets the {link PaymentType}.
      Parameters:
      type - The payment type
      Returns:
      The builder
    • rentMinTime

      EconomyData.Builder rentMinTime(int min)
      Sets the minimum time to rent. Note: The time is based on getPaymentType().
      Parameters:
      min - The min rent time
      Returns:
      The builder
    • rentMaxTime

      EconomyData.Builder rentMaxTime(int max)
      Sets the maximum time to rent. Note: The time is based on getPaymentType().
      Parameters:
      max - The max rent time
      Returns:
      The builder
    • rentEndDate

      EconomyData.Builder rentEndDate(@Nullable Instant date)
      Sets the rent end date. Note: If set, renters may rent until end date. Once end date is reached, the claim will no longer be rentable.
      Parameters:
      date - The end date
      Returns:
      The builder
    • rentRate

      EconomyData.Builder rentRate(double rate)
      Sets a rent rate for Claim.
      Parameters:
      rate -
      Returns:
      The builder
    • rentStripNbt

      EconomyData.Builder rentStripNbt(boolean stripNbt)
      Sets whether a rented claim will strip all block NBT data on restore. Note: This is only used when a rented claim is restored on rental end.
      Parameters:
      stripNbt -
      Returns:
      The builder
    • saleEndDate

      EconomyData.Builder saleEndDate(@Nullable Instant date)
      Sets the sale end date. Note: The claim will no longer be for sale when end date is reached.
      Parameters:
      date - The end date
      Returns:
      The builder
    • salePrice

      EconomyData.Builder salePrice(double price)
      Sets a sale price for Claim.
      Parameters:
      price - The sale price
      Returns:
      The builder
    • forRent

      EconomyData.Builder forRent(boolean forRent)
      Enables or disables the rental of Claim.
      Parameters:
      forRent - true to enable, false to disable
      Returns:
      The builder
    • forSale

      EconomyData.Builder forSale(boolean forSale)
      Enables or disables the sale of Claim.
      Parameters:
      forSale - true to enable, false to disable
      Returns:
      The builder
    • rentSignPosition

      EconomyData.Builder rentSignPosition(int x, int y, int z)
      Sets the rent sign pos.
      Parameters:
      x - The x pos
      y - The y pos
      z - The z pos
      Returns:
      The builder
    • saleSignPosition

      EconomyData.Builder saleSignPosition(int x, int y, int z)
      Sets the sale sign pos.
      Parameters:
      x - The x pos
      y - The y pos
      z - The z pos
      Returns:
      The builder
    • build

      EconomyData build()
      Returns the EconomyData.
      Returns:
      The created economy data