Class VaultUnlockedEconomyAdapter
java.lang.Object
com.palmergames.bukkit.towny.object.economy.adapter.VaultUnlockedEconomyAdapter
- All Implemented Interfaces:
EconomyAdapter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to add money to an account.void
deleteAccount
(Account account) Removes an account.double
getBalance
(Account account) Gets the balance of the account.getFormattedBalance
(double balance) Get's the proper formatting for a given balance.boolean
hasAccount
(Account account) Checks whether the given account exists.name()
void
newAccount
(Account account) Attempts to create an account.boolean
renameAccount
(Account account, String newName) Renames an account.boolean
setBalance
(Account account, double amount) Sets the balance of the account.boolean
Attempts to subtract money from an account.
-
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
- Specified by:
name
in interfaceEconomyAdapter
-
add
Description copied from interface:EconomyAdapter
Attempts to add money to an account.- Specified by:
add
in interfaceEconomyAdapter
- Parameters:
account
- The account.amount
- The amount to add.- Returns:
- A boolean indicating success.
-
subtract
Description copied from interface:EconomyAdapter
Attempts to subtract money from an account.- Specified by:
subtract
in interfaceEconomyAdapter
- Parameters:
account
- The account.amount
- The amount to add.- Returns:
- A boolean indicating success.
-
hasAccount
Description copied from interface:EconomyAdapter
Checks whether the given account exists.- Specified by:
hasAccount
in interfaceEconomyAdapter
- Parameters:
account
- 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:
account
- The account.- Returns:
- A boolean indicating success.
-
newAccount
Description copied from interface:EconomyAdapter
Attempts to create an account.- Specified by:
newAccount
in interfaceEconomyAdapter
- Parameters:
account
- The name of the new account.
-
deleteAccount
Description copied from interface:EconomyAdapter
Removes an account.- Specified by:
deleteAccount
in interfaceEconomyAdapter
- Parameters:
account
- The name of the account to remove.
-
renameAccount
Description copied from interface:EconomyAdapter
Renames an account.- Specified by:
renameAccount
in interfaceEconomyAdapter
- Parameters:
account
- the Account to rename.newName
- the name to give the Account.
-
setBalance
Description copied from interface:EconomyAdapter
Sets the balance of the account.- Specified by:
setBalance
in interfaceEconomyAdapter
- Parameters:
account
- The account.amount
- The amount to add.- 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.
-