Package com.kraken.api.query.world
Class WorldEntity
- java.lang.Object
-
- com.kraken.api.core.AbstractEntity<net.runelite.api.World>
-
- com.kraken.api.query.world.WorldEntity
-
- All Implemented Interfaces:
Interactable<net.runelite.api.World>
public class WorldEntity extends AbstractEntity<net.runelite.api.World>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractEntity
ctx, raw
-
-
Constructor Summary
Constructors Constructor Description WorldEntity(Context ctx, net.runelite.api.World raw, net.runelite.http.api.worlds.World httpPackageWorld)
-
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.booleanhop()Attempts to perform a world hop for the currentWorldEntity.booleaninteract(java.lang.String action)Interacts with the entity using the given action verb.-
Methods inherited from class com.kraken.api.core.AbstractEntity
equals, hashCode, isNull, raw
-
-
-
-
Constructor Detail
-
WorldEntity
public WorldEntity(Context ctx, net.runelite.api.World raw, net.runelite.http.api.worlds.World httpPackageWorld)
-
-
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.
-
getId
public int getId()
Description copied from interface:InteractableThe item ID for the wrapped game entity- Returns:
- int Item id
-
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
-
hop
public boolean hop()
Attempts to perform a world hop for the currentWorldEntity.This method interacts with the RuneLite client to hop to the target world associated with this
WorldEntity. Depending on the client's state, it may handle login screen transitions or directly use the world hopper interface to complete the action. This operation may require the world hopper plugin to be enabled.- Returns:
trueif the world hop was successfully performed;falseotherwise.
-
-