Class BankEntity
- java.lang.Object
-
- com.kraken.api.core.AbstractEntity<BankItemWidget>
-
- com.kraken.api.query.container.bank.BankEntity
-
- All Implemented Interfaces:
Interactable<BankItemWidget>
public class BankEntity extends AbstractEntity<BankItemWidget>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractEntity
ctx, raw
-
-
Constructor Summary
Constructors Constructor Description BankEntity(Context ctx, BankItemWidget raw)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()The item ID for the wrapped game entityjava.lang.StringgetName()The game entities name.booleaninteract(java.lang.String action)Interacts with the entity using the given action verb.booleanwithdraw(int amount)Withdraws a specific amount.booleanwithdraw(int amount, boolean noted)Withdraws a specific amount with explicit Note mode selection.booleanwithdrawAll()Withdraws All of this item.booleanwithdrawAllNoted()Withdraws All of this item, ensuring it comes out as Notes.booleanwithdrawFive()Withdraws 5 of this item.booleanwithdrawOne()Withdraws 1 of this item.booleanwithdrawTen()Withdraws 10 of this item.-
Methods inherited from class com.kraken.api.core.AbstractEntity
equals, hashCode, isNull, raw
-
-
-
-
Constructor Detail
-
BankEntity
public BankEntity(Context ctx, BankItemWidget raw)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:InteractableThe 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:InteractableInteracts 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:InteractableThe item ID for the wrapped game entity- Returns:
- int Item id
-
withdrawOne
public boolean withdrawOne()
Withdraws 1 of this item.- Returns:
- true if the withdrawal was successful and false otherwise
-
withdrawFive
public boolean withdrawFive()
Withdraws 5 of this item.- Returns:
- true if the withdrawal was successful and false otherwise
-
withdrawTen
public boolean withdrawTen()
Withdraws 10 of this item.- Returns:
- true if the withdrawal was successful and false otherwise
-
withdrawAll
public boolean withdrawAll()
Withdraws All of this item.- Returns:
- true if the withdrawal was successful and false otherwise
-
withdrawAllNoted
public boolean withdrawAllNoted()
Withdraws All of this item, ensuring it comes out as Notes.- Returns:
- true if the withdrawal was successful and false otherwise
-
withdraw
public boolean withdraw(int amount)
Withdraws a specific amount. Handles "Withdraw-X" logic including scripts. Defaults to un-noted (Item) mode.- Parameters:
amount- The amount of the item to withdraw- Returns:
- true if the withdrawal was successful and false otherwise
-
withdraw
public boolean withdraw(int amount, boolean noted)Withdraws a specific amount with explicit Note mode selection.- Parameters:
amount- The amount of the item to withdraw: 1, 5, or 10. Any other value will withdraw X of that valuenoted- True if the items should be withdrawn as notes and false if they should be withdrawn as items- Returns:
- true if the withdrawal was successful and false otherwise
-
-