Class VaultEconomyAdapter
java.lang.Object
com.palmergames.bukkit.towny.object.economy.adapter.VaultEconomyAdapter
- All Implemented Interfaces:
EconomyAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Attempts to subtract money from an account.
-
Constructor Details
-
VaultEconomyAdapter
public VaultEconomyAdapter(net.milkbowl.vault.economy.Economy economy)
-
-
Method Details
-
add
Description copied from interface:EconomyAdapter
Attempts to add money to an account.- Specified by:
add
in interfaceEconomyAdapter
- 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
Description copied from interface:EconomyAdapter
Attempts to subtract money from an account.- Specified by:
subtract
in interfaceEconomyAdapter
- 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
Description copied from interface:EconomyAdapter
Checks whether the given account exists.- Specified by:
hasAccount
in interfaceEconomyAdapter
- Parameters:
accountName
- The name of the account.- Returns:
- A boolean indicating success.
-
getBalance
Description copied from interface:EconomyAdapter
Gets the balance of the account.- Specified by:
getBalance
in interfaceEconomyAdapter
- Parameters:
accountName
- The name of the account.world
- The world this account is in.- Returns:
- A boolean indicating success.
-
newAccount
Description copied from interface:EconomyAdapter
Attempts to create an account.- Specified by:
newAccount
in interfaceEconomyAdapter
- Parameters:
accountName
- The name of the new account.
-
deleteAccount
Description copied from interface:EconomyAdapter
Removes an account.- Specified by:
deleteAccount
in interfaceEconomyAdapter
- Parameters:
accountName
- The name of the account to remove.
-
setBalance
Description copied from interface:EconomyAdapter
Sets the balance of the account.- Specified by:
setBalance
in interfaceEconomyAdapter
- 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
Description copied from interface:EconomyAdapter
Get's the proper formatting for a given balance.- Specified by:
getFormattedBalance
in interfaceEconomyAdapter
- Parameters:
balance
- The balance to format.- Returns:
- A string with the balance formatted.
-