public interface IslandBank
Modifier and Type | Method and Description |
---|---|
boolean |
canDepositMoney(java.math.BigDecimal amount)
Whether it's possible to deposit money into the bank without exceeding the bank limit.
|
BankTransaction |
depositAdminMoney(org.bukkit.command.CommandSender commandSender,
java.math.BigDecimal amount)
Deposit money into the bank, without taking money from any player.
|
BankTransaction |
depositMoney(SuperiorPlayer superiorPlayer,
java.math.BigDecimal amount)
Deposit money into the bank.
|
java.util.List<BankTransaction> |
getAllTransactions()
Get all the transactions of the bank, sorted by the time they were created.
|
java.math.BigDecimal |
getBalance()
Get balance in bank.
|
java.util.List<BankTransaction> |
getConsoleTransactions()
Get all the transactions made by CONSOLE.
|
java.util.List<BankTransaction> |
getTransactions(SuperiorPlayer superiorPlayer)
Get all the transactions made by a player.
|
void |
loadTransaction(BankTransaction bankTransaction)
Load a transaction log.
|
void |
setBalance(java.math.BigDecimal balance)
Set the balance in the bank.
|
BankTransaction |
withdrawAdminMoney(org.bukkit.command.CommandSender commandSender,
java.math.BigDecimal amount)
Withdraw money from the bank, without giving it to any player.
|
BankTransaction |
withdrawMoney(SuperiorPlayer superiorPlayer,
java.math.BigDecimal amount,
java.util.List<java.lang.String> commandsToExecute)
Withdraw money from the bank.
|
java.math.BigDecimal getBalance()
void setBalance(java.math.BigDecimal balance)
BankTransaction depositMoney(SuperiorPlayer superiorPlayer, java.math.BigDecimal amount)
superiorPlayer
- The player that deposited the money.amount
- The amount to deposit.BankTransaction depositAdminMoney(org.bukkit.command.CommandSender commandSender, java.math.BigDecimal amount)
commandSender
- The player that deposited the money.amount
- The amount to deposit.boolean canDepositMoney(java.math.BigDecimal amount)
amount
- The amount of money to deposit.BankTransaction withdrawMoney(SuperiorPlayer superiorPlayer, java.math.BigDecimal amount, @Nullable java.util.List<java.lang.String> commandsToExecute)
superiorPlayer
- The player that withdrawn the money.amount
- The amount to withdraw.commandsToExecute
- Commands to execute instead of using the default economy provider.
The commands can use {0} as player's name placeholder, and {1} for the amount.BankTransaction withdrawAdminMoney(org.bukkit.command.CommandSender commandSender, java.math.BigDecimal amount)
commandSender
- The player that withdrawn the money.amount
- The amount to withdraw.java.util.List<BankTransaction> getAllTransactions()
java.util.List<BankTransaction> getTransactions(SuperiorPlayer superiorPlayer)
java.util.List<BankTransaction> getConsoleTransactions()
void loadTransaction(BankTransaction bankTransaction)
bankTransaction
- The transaction object to load.