Class VaultEconomyAdapter

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

public class VaultEconomyAdapter extends Object implements EconomyAdapter
  • Constructor Details

    • VaultEconomyAdapter

      public VaultEconomyAdapter(net.milkbowl.vault.economy.Economy economy)
  • Method Details

    • add

      public boolean add(String accountName, double amount, org.bukkit.World world)
      Description copied from interface: EconomyAdapter
      Attempts to add money to an account.
      Specified by:
      add in interface EconomyAdapter
      Parameters:
      accountName - The name of the account.
      amount - The amount to add.
      world - The world this account is in.
      Returns:
      A boolean indicating success.
    • subtract

      public boolean subtract(String accountName, double amount, org.bukkit.World world)
      Description copied from interface: EconomyAdapter
      Attempts to subtract money from an account.
      Specified by:
      subtract in interface EconomyAdapter
      Parameters:
      accountName - The name of the account.
      amount - The amount to add.
      world - The world this account is in.
      Returns:
      A boolean indicating success.
    • hasAccount

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

      public double getBalance(String accountName, org.bukkit.World world)
      Description copied from interface: EconomyAdapter
      Gets the balance of the account.
      Specified by:
      getBalance in interface EconomyAdapter
      Parameters:
      accountName - The name of the account.
      world - The world this account is in.
      Returns:
      A boolean indicating success.
    • newAccount

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

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

      public boolean setBalance(String accountName, double amount, org.bukkit.World world)
      Description copied from interface: EconomyAdapter
      Sets the balance of the account.
      Specified by:
      setBalance in interface EconomyAdapter
      Parameters:
      accountName - The name of the account.
      amount - The amount to add.
      world - The world this account is in.
      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.