Class ReserveEconomyAdapter
java.lang.Object
com.palmergames.bukkit.towny.object.economy.adapter.ReserveEconomyAdapter
- All Implemented Interfaces:
EconomyAdapter
- Direct Known Subclasses:
ReserveEconomyAdapter.Legacy
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAttempts to add money to an account.voiddeleteAccount(Account account) Removes an account.doublegetBalance(Account account) Gets the balance of the account.getFormattedBalance(double balance) Get's the proper formatting for a given balance.booleanhasAccount(Account account) Checks whether the given account exists.name()voidnewAccount(Account account) Attempts to create an account.booleanrenameAccount(Account account, String newName) Renames an account.booleansetBalance(Account account, double amount) Sets the balance of the account.booleanAttempts to subtract money from an account.
-
Constructor Details
-
ReserveEconomyAdapter
public ReserveEconomyAdapter(net.tnemc.core.economy.EconomyAPI economy)
-
-
Method Details
-
name
- Specified by:
namein interfaceEconomyAdapter
-
add
Description copied from interface:EconomyAdapterAttempts to add money to an account.- Specified by:
addin interfaceEconomyAdapter- Parameters:
account- The account.amount- The amount to add.- Returns:
- A boolean indicating success.
-
subtract
Description copied from interface:EconomyAdapterAttempts to subtract money from an account.- Specified by:
subtractin interfaceEconomyAdapter- Parameters:
account- The account.amount- The amount to add.- Returns:
- A boolean indicating success.
-
hasAccount
Description copied from interface:EconomyAdapterChecks whether the given account exists.- Specified by:
hasAccountin interfaceEconomyAdapter- Parameters:
account- The account.- Returns:
- A boolean indicating success.
-
getBalance
Description copied from interface:EconomyAdapterGets the balance of the account.- Specified by:
getBalancein interfaceEconomyAdapter- Parameters:
account- The account.- Returns:
- A boolean indicating success.
-
newAccount
Description copied from interface:EconomyAdapterAttempts to create an account.- Specified by:
newAccountin interfaceEconomyAdapter- Parameters:
account- The name of the new account.
-
deleteAccount
Description copied from interface:EconomyAdapterRemoves an account.- Specified by:
deleteAccountin interfaceEconomyAdapter- Parameters:
account- The name of the account to remove.
-
setBalance
Description copied from interface:EconomyAdapterSets the balance of the account.- Specified by:
setBalancein interfaceEconomyAdapter- Parameters:
account- The account.amount- The amount to add.- Returns:
- A boolean indicating success.
-
getFormattedBalance
Description copied from interface:EconomyAdapterGet's the proper formatting for a given balance.- Specified by:
getFormattedBalancein interfaceEconomyAdapter- Parameters:
balance- The balance to format.- Returns:
- A string with the balance formatted.
-
renameAccount
Description copied from interface:EconomyAdapterRenames an account.- Specified by:
renameAccountin interfaceEconomyAdapter- Parameters:
account- the Account to rename.newName- the name to give the Account.
-