Package net.storm.api.interact
Class RunnableAction
java.lang.Object
net.storm.api.interact.RunnableAction
- All Implemented Interfaces:
Automation
Represents an arbitrary code execution action within the automation queue.
This automation action wraps a Runnable that will be executed when
the action reaches the front of the automation queue. This allows for
custom logic to be interspersed with other automation actions.
Use cases include:
- Executing validation logic between interactions
- Updating state after an action completes
- Logging or debugging automation sequences
- Performing calculations that affect subsequent actions
Example usage:
interactManager.queue(new RunnableAction(() -> {
System.out.println("Action completed!");
counter++;
}));
Note: The runnable is executed on the game thread, so long-running operations should be avoided to prevent blocking game updates.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RunnableAction
public RunnableAction()
-