Class Economy.Builder

java.lang.Object
us.teaminceptus.novaconomy.api.economy.Economy.Builder
Enclosing class:
Economy

public static final class Economy.Builder extends Object
Class used for Creating Economies
See Also:
  • Method Details

    • setSymbol

      public Economy.Builder setSymbol(char symbol)
      Set the Symbol of this Economy
      Parameters:
      symbol - Symbol of this economy
      Returns:
      Builder Class, for chaining
    • setName

      public Economy.Builder setName(String name)
      Set the name of this Economy
      Parameters:
      name - Name of the Economy
      Returns:
      Builder Class, for chaining
    • setIcon

      public Economy.Builder setIcon(Material iconM)
      Set the Icon of this Economy
      Parameters:
      iconM - Icon Material
      Returns:
      Builder Class, for chaining
      See Also:
    • setIcon

      public Economy.Builder setIcon(ItemStack stack)
      Set the Icon of this Economy
      Parameters:
      stack - ItemStack for this economy
      Returns:
      Builder Class, for chaining
    • setIncreaseNaturally

      public Economy.Builder setIncreaseNaturally(boolean increaseNaturally)
      Set whether or not this economy increases naturally (i.e. Increases from Mining)
      Parameters:
      increaseNaturally - Whether this economy should increase from Natural Causes
      Returns:
      Builder Class, for chaining
    • setConversionScale

      public Economy.Builder setConversionScale(double scale) throws IllegalArgumentException
      Set the Conversion Scale (used to convert the value to other economies)
      Parameters:
      scale - Scale of this economy
      Returns:
      Builder Class, for chaining
      Throws:
      IllegalArgumentException - if scale is not positive
    • setClickableReward

      public Economy.Builder setClickableReward(boolean clickableReward)
      Sets whether this Economy can be usedas a reward from host businesses when advertising.
      Parameters:
      clickableReward - true if clickable reward, else false
      Returns:
      Builder Class, for chaining
    • setCustomModelData

      public Economy.Builder setCustomModelData(int modelData)
      Sets the custom model data integer for this Economy.
      Parameters:
      modelData - Custom Model Data Integer
      Returns:
      Builder Class, for chaining
    • build

      Builds this economy
      Returns:
      Created Economy
      Throws:
      IllegalArgumentException - if name is null (icon's default is Gold Ingot)
      UnsupportedOperationException - if already exists or symbol is taken