Class BankService


  • @Singleton
    public class BankService
    extends java.lang.Object
    A 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 BankInventoryQuery and BankQuery respectively.

    • Constructor Summary

      Constructors 
      Constructor Description
      BankService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean close()
      Closes the bank interface if it is open.
      boolean depositAll()
      Deposit all items in the players inventory into the bank.
      boolean depositAllEquipment()
      Deposits all worn items from the players equipment tab into the bank.
      boolean isOpen()
      Checks whether the bank interface is open.
      boolean setWithdrawMode​(boolean noted)
      Sets the withdrawal mode as either a note or item.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BankService

        public BankService()
    • Method Detail

      • isOpen

        public boolean isOpen()
        Checks whether the bank interface is open.
        Returns:
        true if the bank interface is open, false otherwise.
      • 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