Package privbot.task
@PublicApi
package privbot.task
Task tree:
SimpleNode, Parent,
Child, TaskNodeRunner, and
PrivTaskContext (ctx).
Lifecycle with TaskNodeRunner: register nodes, call start() when the
user presses Start, onGameTick() from the plugin's onGameTick, and stop()
(or shutdown()) on Stop and in shutDown(). Each tick the runner's
ScriptExecutor worker selects one node on the client thread (the
highest-priority enabled node whose shouldExecute is true; ties keep registration order) and
runs its execute on the worker, where sleeping is allowed. Ticks that arrive while a node is
still running collapse into one.
Node rules: shouldExecute is a read-only predicate (no dispatch, no waits);
execute does one bounded piece of work and returns whether it acted. Group related nodes
under a Parent; pick priorities from TaskPriorityBands.
-
ClassDescriptionOrdered automation stages for
StagedTaskRunner.Child<C>Shared base class for child task behaviors owned by aParent.A task node that holds child nodes and delegates execution using a strategy.Execution strategy for child nodes.Parent<C>Shared parent node that owns a local group ofChildtasks and selects the highest-priority eligible child when it executes.Base context for TaskNode-based scripts that exposes all PrivContext hooks directly.Runs script logic on a dedicated thread so thatsleep()andsleepUntil()block only the script — never the client (game-tick) thread.SimpleNode<C>Abstract convenience base for single-tick task nodes.RunsTaskNodes inAutomationStageorder.TaskNode<C>Base interface for all task nodes in the PrivBot task framework.Manages a flat list ofTaskNodes and executes the highest-priority valid node each tick.Optional named integers for catalog and staged task trees.Optional read-only diagnostics.