Class DepositBoxEntity

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int count()
      Returns the quantity of the item in your inventory when the bank deposit box interface is open.
      boolean deposit()
      Deposits a single instance of the specified item into the bank deposit box.
      boolean deposit​(int amount)
      Deposits a set amount of the given item from the players' inventory to the bank.
      boolean depositAll()
      Deposits all the given items from the players inventory into the bank deposit box.
      boolean depositFive()
      Deposits five of the given items from the players' inventory into the bank deposit box.
      boolean depositOne()
      Deposits one of the given item from the players inventory into the bank deposit box.
      boolean depositTen()
      Deposits ten of the given items from the players' inventory into the bank deposit box.
      boolean depositX​(int amount)
      Deposits X amount of an item from the players inventory into the bank deposit box.
      int getId()
      The item ID for the wrapped game entity
      java.lang.String getName()
      The game entities name.
      boolean hasAction​(java.lang.String action)
      Checks if the specified action is available in the inventory actions of the container item.
      boolean interact​(java.lang.String action)
      Interacts with the entity using the given action verb.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Interactable
        The game entities name.
        Returns:
        The name of the game entity i.e. NPC name for NPC's, item name for ContainerItem's, and GameObject name for various game objects.
      • interact

        public boolean interact​(java.lang.String action)
        Description copied from interface: Interactable
        Interacts with the entity using the given action verb.
        Parameters:
        action - The menu action to trigger (e.g., "Attack", "Talk-to", "Take")
        Returns:
        true if the interaction packet was successfully queued/sent
      • getId

        public int getId()
        Description copied from interface: Interactable
        The item ID for the wrapped game entity
        Returns:
        int Item id
      • count

        public int count()
        Returns the quantity of the item in your inventory when the bank deposit box interface is open.
        Returns:
        Int the quantity of the bank inventory entity (this will be the stack size of the item if it is noted) or the value of the item if it's coins.
      • depositOne

        public boolean depositOne()
        Deposits one of the given item from the players inventory into the bank deposit box. This will **NOT** work for depositing equipment if ctx.depositBox().inEquipment(); is used to filter the deposit box.
        Returns:
        true if the deposit was successful and false otherwise.
      • depositFive

        public boolean depositFive()
        Deposits five of the given items from the players' inventory into the bank deposit box. This will **NOT** work for depositing equipment if ctx.depositBox().inEquipment(); is used to filter the deposit box.
        Returns:
        true if the deposit was successful and false otherwise.
      • depositTen

        public boolean depositTen()
        Deposits ten of the given items from the players' inventory into the bank deposit box. This will **NOT** work for depositing equipment if ctx.depositBox().inEquipment(); is used to filter the deposit box.
        Returns:
        true if the deposit was successful and false otherwise.
      • depositX

        public boolean depositX​(int amount)
        Deposits X amount of an item from the players inventory into the bank deposit box. This will **NOT** work or depositing equipment if ctx.depositBox().inEquipment(); is used to filter the deposit box.
        Parameters:
        amount - The amount of the item to deposit.
        Returns:
        true if the deposit was successful and false otherwise.
      • depositAll

        public boolean depositAll()
        Deposits all the given items from the players inventory into the bank deposit box. This will **NOT** work for depositing equipment if ctx.depositBox().inEquipment(); is used to filter the deposit box.
        Returns:
        true if the deposit was successful and false otherwise.
      • deposit

        public boolean deposit​(int amount)
        Deposits a set amount of the given item from the players' inventory to the bank. If the amount is not one of: 1, 5, or 10, then all the given items will be deposited by default.
        Parameters:
        amount - The amount of the item to deposit: 1, 5, 10, or any other integer for all the item
        Returns:
        True if the deposit was successful and false otherwise
      • deposit

        public boolean deposit()
        Deposits a single instance of the specified item into the bank deposit box. If the instance is stackable like arrows it will deposit all arrows into the bank.

        This method performs different actions based on the origin of the container item:

        • If the item's origin is @EQUIPMENT, it interacts with the associated widget to deposit the item.
        • Otherwise, it uses the interaction manager to execute a "Deposit-1" action for the item.
        Returns:
        true if the deposit operation is executed successfully, false otherwise.
      • hasAction

        public boolean hasAction​(java.lang.String action)
        Checks if the specified action is available in the inventory actions of the container item.

        This method retrieves the item's inventory actions and verifies if any action matches the provided action string, ignoring case sensitivity.

        Parameters:
        action - a String representing the name of the action to check for. It is case-insensitive, and null or empty actions are ignored.
        Returns:
        true if the specified action is available in the item's inventory actions; false otherwise.