Package rs.kreme.ksbot.api.interfaces
Interface Interactable
-
- All Known Implementing Classes:
KSGroundItem
,KSItem
,KSNPC
,KSObject
,KSPlayer
public interface Interactable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String[]
getActions()
default java.awt.geom.Rectangle2D
getClickBounds()
Retrieves the clickable screen bounds of the object, if applicable.default int
getOptionIndex(java.lang.String action)
Finds the index of a specified action in the NPC's available actions.default boolean
hasAction(java.lang.String action)
void
interact(int index)
void
interact(int index, net.runelite.api.MenuAction menuAction)
void
interact(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)
boolean
interact(java.lang.String action)
void
interact(net.runelite.api.MenuAction menuAction)
-
-
-
Field Detail
-
ctx
static final KSContext ctx
-
-
Method Detail
-
getActions
java.lang.String[] getActions()
-
interact
boolean interact(java.lang.String action)
-
interact
void interact(int index)
-
interact
void interact(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)
-
interact
void interact(int index, net.runelite.api.MenuAction menuAction)
-
interact
void interact(net.runelite.api.MenuAction menuAction)
-
hasAction
default boolean hasAction(java.lang.String action)
-
getOptionIndex
default int getOptionIndex(java.lang.String action)
Finds the index of a specified action in the NPC's available actions.- Parameters:
action
- the name of the action to search for.- Returns:
- the index of the action in the action array, or -1 if not found.
-
getClickBounds
default java.awt.geom.Rectangle2D getClickBounds()
Retrieves the clickable screen bounds of the object, if applicable. Currently supports KSItem instances by delegating to their widget.- Returns:
- the Rectangle2D click bounds, or null if unavailable.
-
-