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 Link icon

    • economy Link icon

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

    • VaultUnlockedEconomyAdapter Link icon

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

    • name Link icon

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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.