public abstract class ACurrency extends Expansion
Represents an auction currency addon that can allow multiple currencies for the plugin.
  • Constructor Details

    • ACurrency

      public ACurrency()
  • Method Details

    • getCurrencyName

      public abstract String getCurrencyName()
      Retrieve the currency name.
      Returns:
      The currency name from the configuration file that is used by players to determine the currency.
    • getCurrencyPrefix

      public abstract String getCurrencyPrefix()
      Retrieve the prefix for the currency.
      Returns:
      The currency prefix from the configuration file that is shown is used for the price variable.
    • getCurrencyPrefix

      public String getCurrencyPrefix(String amount)
      Retrieve the prefix for the currency with the replaced variable.
      Parameters:
      amount - The formatted amount that is shown in the currency prefix.
      Returns:
      The original currency prefix with the replaced variable as the specified amount.
    • getMinPricePurchaseAmount

      public abstract double getMinPricePurchaseAmount()
      Retrieve the currency minimum price amount.
      Returns:
      The currency minimum price amount for the confirmation GUI.
    • getMinPriceSellAmount

      public abstract double getMinPriceSellAmount()
      Retrieve the currency minimum price amount.
      Returns:
      The minimum price you can sell an item for.
    • getMaxPriceSellAmount

      public abstract double getMaxPriceSellAmount()
      Retrieve the currency maximum price amount.
      Returns:
      The maximum price you can sell an item for.
    • getMinPriceBidAmount

      public abstract double getMinPriceBidAmount()
      Retrieve the currency minimum bid amount.
      Returns:
      The minimum price you can bid for an item.
    • hasDecimalSupport

      public abstract boolean hasDecimalSupport()
      Retrieve if the currency allows doubles (decimals) or integers (whole).
      Returns:
      If the currency allows decimals or not.
    • hasBalance

      public void hasBalance(APlayer aPlayer, double amount, Consumer<Boolean> hasConsumer)
      Retrieve if the player has the balance specified in this currency.
      Parameters:
      aPlayer - The player to that checks the balance for.
      amount - The amount to check for.
      hasConsumer - Callback If the player has the amount in this currency.
    • getBalance

      public abstract void getBalance(APlayer aPlayer, Consumer<Double> balanceConsumer)
      Retrieve the balance from a player in this currency.
      Parameters:
      aPlayer - The player to get the balance from.
      balanceConsumer - Callback for getting the balance.
    • deposit

      public abstract void deposit(APlayer aPlayer, double amount)
      Deposit the amount into the players balance in this currency.
      Parameters:
      aPlayer - The player that'll receive a deposit in this currency.
      amount - The amount to give in this currency.
    • withdraw

      public abstract void withdraw(APlayer aPlayer, double amount)
      Withdraw the amount from the players balance in this currency.
      Parameters:
      aPlayer - The player to withdraw the currency from.
      amount - The amount to take from this currency.