Interface EconomyAdapter

All Known Implementing Classes:
ReserveEconomyAdapter, VaultEconomyAdapter

public interface EconomyAdapter
An adapter that is used to adapt multiple economy implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(String accountName, double amount, org.bukkit.World world)
    Attempts to add money to an account.
    void
    deleteAccount(String accountName)
    Removes an account.
    double
    getBalance(String accountName, org.bukkit.World world)
    Gets the balance of the account.
    getFormattedBalance(double balance)
    Get's the proper formatting for a given balance.
    boolean
    hasAccount(String accountName)
    Checks whether the given account exists.
    void
    newAccount(String accountName)
    Attempts to create an account.
    boolean
    setBalance(String accountName, double amount, org.bukkit.World world)
    Sets the balance of the account.
    boolean
    subtract(String accountName, double amount, org.bukkit.World world)
    Attempts to subtract money from an account.
  • Method Details

    • add

      boolean add(String accountName, double amount, org.bukkit.World world)
      Attempts to add money to an account.
      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

      boolean subtract(String accountName, double amount, org.bukkit.World world)
      Attempts to subtract money from an account.
      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

      boolean hasAccount(String accountName)
      Checks whether the given account exists.
      Parameters:
      accountName - The name of the account.
      Returns:
      A boolean indicating success.
    • getBalance

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

      void newAccount(String accountName)
      Attempts to create an account.
      Parameters:
      accountName - The name of the new account.
    • deleteAccount

      void deleteAccount(String accountName)
      Removes an account.
      Parameters:
      accountName - The name of the account to remove.
    • setBalance

      boolean setBalance(String accountName, double amount, org.bukkit.World world)
      Sets the balance of the account.
      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

      String getFormattedBalance(double balance)
      Get's the proper formatting for a given balance.
      Parameters:
      balance - The balance to format.
      Returns:
      A string with the balance formatted.