Class Bounty.Builder

java.lang.Object
us.teaminceptus.novaconomy.api.player.Bounty.Builder
Enclosing class:
Bounty

public static final class Bounty.Builder extends Object
Represents a builder class for a Bounty
  • Method Details

    • setOwner

      public Bounty.Builder setOwner(@NotNull @NotNull OfflinePlayer owner)
      Sets the Owner of this Bounty.
      Parameters:
      owner - Bounty Owner
      Returns:
      this builder, for chaining
    • setOwner

      public Bounty.Builder setOwner(@NotNull @NotNull NovaPlayer owner)
      Sets the Owner of this Bounty.
      Parameters:
      owner - Bounty Owner
      Returns:
      this builder, for chaining
    • setEconomy

      public Bounty.Builder setEconomy(@NotNull @NotNull Economy econ)
      Sets the Economy of this Bounty.
      Parameters:
      econ - Economy of this Bounty
      Returns:
      this builder, for chaining
    • setAmount

      public Bounty.Builder setAmount(double amount)
      Sets the Amount of this Bounty.
      Parameters:
      amount - Amount of this Bounty
      Returns:
      this builder, for chaining
    • setTarget

      public Bounty.Builder setTarget(@NotNull @NotNull OfflinePlayer target)
      Sets the Target of this Bounty.
      Parameters:
      target - Target of this Bounty
      Returns:
      this builder, for chaining
    • build

      Builds the Bounty
      Returns:
      Bounty Built
      Throws:
      UnsupportedOperationException - if a bounty with this target already exists
      IllegalArgumentException - if amount is not positive, or owner/economy/target are null