Class VaultUnlockedEconomyAdapter

java.lang.Object
com.palmergames.bukkit.towny.object.economy.adapter.VaultUnlockedEconomyAdapter
All Implemented Interfaces:
EconomyAdapter

public class VaultUnlockedEconomyAdapter extends Object implements EconomyAdapter
  • Field Details

    • economy

      protected final net.milkbowl.vault2.economy.Economy economy
  • Constructor Details

    • VaultUnlockedEconomyAdapter

      public VaultUnlockedEconomyAdapter(net.milkbowl.vault2.economy.Economy economy)
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface EconomyAdapter
    • add

      public boolean add(Account account, double amount)
      Description copied from interface: EconomyAdapter
      Attempts to add money to an account.
      Specified by:
      add in interface EconomyAdapter
      Parameters:
      account - The account.
      amount - The amount to add.
      Returns:
      A boolean indicating success.
    • subtract

      public boolean subtract(Account account, double amount)
      Description copied from interface: EconomyAdapter
      Attempts to subtract money from an account.
      Specified by:
      subtract in interface EconomyAdapter
      Parameters:
      account - The account.
      amount - The amount to add.
      Returns:
      A boolean indicating success.
    • hasAccount

      public boolean hasAccount(Account account)
      Description copied from interface: EconomyAdapter
      Checks whether the given account exists.
      Specified by:
      hasAccount in interface EconomyAdapter
      Parameters:
      account - The account.
      Returns:
      A boolean indicating success.
    • getBalance

      public double getBalance(Account account)
      Description copied from interface: EconomyAdapter
      Gets the balance of the account.
      Specified by:
      getBalance in interface EconomyAdapter
      Parameters:
      account - The account.
      Returns:
      A boolean indicating success.
    • newAccount

      public void newAccount(Account account)
      Description copied from interface: EconomyAdapter
      Attempts to create an account.
      Specified by:
      newAccount in interface EconomyAdapter
      Parameters:
      account - The name of the new account.
    • deleteAccount

      public void deleteAccount(Account account)
      Description copied from interface: EconomyAdapter
      Removes an account.
      Specified by:
      deleteAccount in interface EconomyAdapter
      Parameters:
      account - The name of the account to remove.
    • renameAccount

      public boolean renameAccount(Account account, String newName)
      Description copied from interface: EconomyAdapter
      Renames an account.
      Specified by:
      renameAccount in interface EconomyAdapter
      Parameters:
      account - the Account to rename.
      newName - the name to give the Account.
    • setBalance

      public boolean setBalance(Account account, double amount)
      Description copied from interface: EconomyAdapter
      Sets the balance of the account.
      Specified by:
      setBalance in interface EconomyAdapter
      Parameters:
      account - The account.
      amount - The amount to add.
      Returns:
      A boolean indicating success.
    • getFormattedBalance

      public String getFormattedBalance(double balance)
      Description copied from interface: EconomyAdapter
      Get's the proper formatting for a given balance.
      Specified by:
      getFormattedBalance in interface EconomyAdapter
      Parameters:
      balance - The balance to format.
      Returns:
      A string with the balance formatted.