Package com.kraken.api.query.gameobject
Class GameObjectEntity
- java.lang.Object
-
- com.kraken.api.core.AbstractEntity<net.runelite.api.GameObject>
-
- com.kraken.api.query.gameobject.GameObjectEntity
-
- All Implemented Interfaces:
Interactable<net.runelite.api.GameObject>
public class GameObjectEntity extends AbstractEntity<net.runelite.api.GameObject>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractEntity
ctx, raw
-
-
Constructor Summary
Constructors Constructor Description GameObjectEntity(Context ctx, net.runelite.api.GameObject 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.net.runelite.api.ObjectCompositiongetObjectComposition()Returns the object composition for a givenTileObject.booleaninteract(java.lang.String action)Interacts with the entity using the given action verb.booleanisInArea(GameArea area)Checks if the game object is within the game area.booleanuseWidget(net.runelite.api.widgets.Widget widget)Uses a specified widget on the Game Object (i.e.-
Methods inherited from class com.kraken.api.core.AbstractEntity
equals, hashCode, isNull, raw
-
-
-
-
Constructor Detail
-
GameObjectEntity
public GameObjectEntity(Context ctx, net.runelite.api.GameObject raw)
-
-
Method Detail
-
getId
public int getId()
Description copied from interface:InteractableThe item ID for the wrapped game entity- Returns:
- int Item id
-
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.
-
getObjectComposition
public net.runelite.api.ObjectComposition getObjectComposition()
Returns the object composition for a givenTileObject.- Returns:
- The object composition for the wrapped
TileObject.
-
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
-
isInArea
public boolean isInArea(GameArea area)
Checks if the game object is within the game area.- Parameters:
area- TheGameAreato check.- Returns:
- True if the game object is within the game area and false otherwise.
-
useWidget
public boolean useWidget(net.runelite.api.widgets.Widget widget)
Uses a specified widget on the Game Object (i.e. "Bones" on the "Chaos Altar")- Parameters:
widget- The widget to use on the Game Object- Returns:
- True if the interaction was successful and false otherwise
-
-