Package com.kraken.api.service.bank
Class BankService
- java.lang.Object
-
- com.kraken.api.service.bank.BankService
-
@Singleton public class BankService extends java.lang.ObjectA service class for interacting with global bank operations. This class handles operations on the bank interface like: opening, closing, depositing all items, and depositing all equipment.For depositing or withdrawing specific items use
BankInventoryQueryandBankQueryrespectively.
-
-
Constructor Summary
Constructors Constructor Description BankService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclose()Closes the bank interface if it is open.booleandepositAll()Deposit all items in the players inventory into the bank.booleandepositAllEquipment()Deposits all worn items from the players equipment tab into the bank.booleanisOpen()Checks whether the bank interface is open.booleansetWithdrawMode(boolean noted)Sets the withdrawal mode as either a note or item.
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
Checks whether the bank interface is open.- Returns:
trueif the bank interface is open,falseotherwise.
-
setWithdrawMode
public boolean setWithdrawMode(boolean noted)
Sets the withdrawal mode as either a note or item. If the withdrawal mode already matches the provided parameter no action will be taken.- Parameters:
noted- The boolean representing which withdraw mode to set. When set to false items will be withdrawn while true will withdraw items in a noted format.- Returns:
- True if the withdrawal mode was set correctly and false otherwise.
-
close
public boolean close()
Closes the bank interface if it is open.- Returns:
- True if the bank interface was closed successfully and false otherwise
-
depositAll
public boolean depositAll()
Deposit all items in the players inventory into the bank.- Returns:
- True if the deposit was successful and false otherwise
-
depositAllEquipment
public boolean depositAllEquipment()
Deposits all worn items from the players equipment tab into the bank.- Returns:
- True if the deposit was successful and false otherwise
-
-