Interface Interactable
-
- All Superinterfaces:
Actionable
,Clickable
,Renderable
- All Known Subinterfaces:
Actor
,GameEntity
,GroundItem
,ItemWidget
,NPC
,Player
,SceneObject
,WidgetChild
- All Known Implementing Classes:
Tile
public interface Interactable extends Clickable, Actionable
An entity that can be interacted with.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
interact()
Interacts with the entity by clicking on it.default boolean
interact(boolean rightClick)
Interacts with the entity by clicking on it.boolean
interact(int opcode)
Interacts with the entity using the specified menu action opcode.boolean
interact(java.lang.String action)
Interacts with the entity.boolean
interact(java.lang.String action, java.lang.String option)
Interacts with the entity.default boolean
interactMatch(java.lang.String actionRegex)
Interacts with the entity using an action matching the given regular expression.-
Methods inherited from interface com.epicbot.api.shared.entity.details.Actionable
getActions, hasAction, hasActionMatch
-
Methods inherited from interface com.epicbot.api.shared.entity.details.Clickable
click, click, hover
-
Methods inherited from interface com.epicbot.api.shared.entity.details.Renderable
contains, draw, getCentralPoint, getRandomPoint, getRealCentralPoint, isVisible
-
-
-
-
Method Detail
-
interact
default boolean interact()
Interacts with the entity by clicking on it. Convenience method forClickable.click()
.- Returns:
- true if the interaction succeeded, false otherwise
-
interact
default boolean interact(boolean rightClick)
Interacts with the entity by clicking on it. Convenience method forClickable.click(boolean)
.- Parameters:
rightClick
- true to use the right mouse button to click- Returns:
- true if the interaction succeeded, false otherwise
-
interact
boolean interact(java.lang.String action)
Interacts with the entity.- Parameters:
action
- the action to select- Returns:
- true if the interaction succeeded, false otherwise
-
interact
boolean interact(java.lang.String action, java.lang.String option)
Interacts with the entity.- Parameters:
action
- the action to select (e.g. Bank)option
- the option to select (e.g. Bank booth)- Returns:
- true if the interaction succeeded, false otherwise
-
interactMatch
default boolean interactMatch(java.lang.String actionRegex)
Interacts with the entity using an action matching the given regular expression.- Parameters:
actionRegex
- the action regex- Returns:
- true if the interaction succeeded, false otherwise
-
interact
boolean interact(int opcode)
Interacts with the entity using the specified menu action opcode.- Parameters:
opcode
- the menu action op code (e.g. 1005 for "Walk here")- Returns:
- true if the interaction succeeded, false otherwise
-
-