Package com.kraken.api.core
Interface Interactable<T>
-
- All Known Implementing Classes:
AbstractEntity,BankEntity,BankInventoryEntity,EquipmentEntity,GameObjectEntity,GroundObjectEntity,InventoryEntity,LocalPlayerEntity,NpcEntity,PlayerEntity,WidgetEntity,WorldEntity
public interface Interactable<T>
-
-
Method Summary
All Methods Instance Methods Abstract 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.booleanisNull()True when the game entity is null and false otherwise.Traw()Returns the wrapped (raw) RuneLite API object for this interactable game entity.
-
-
-
Method Detail
-
interact
boolean interact(java.lang.String action)
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
-
raw
T raw()
Returns the wrapped (raw) RuneLite API object for this interactable game entity. This is useful to provide easy access to familiar and underlying RuneLite game data. For example: anEquipmentEntitywill expose the RuneLiteWidgetobject for the interactable piece of equipment.- Returns:
- T wrapped RuneLite API object.
-
getId
int getId()
The item ID for the wrapped game entity- Returns:
- int Item id
-
getName
java.lang.String getName()
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.
-
isNull
boolean isNull()
True when the game entity is null and false otherwise. This may happen when a game entity you expected to be present is no longer available i.e. The nearest Oak tree was just chopped down by another player and is now null.- Returns:
- True when the game entity is null and false otherwise.
-
-