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.

  • Class
    Description
    Ordered automation stages for StagedTaskRunner.
    Shared base class for child task behaviors owned by a Parent.
    A task node that holds child nodes and delegates execution using a strategy.
    Execution strategy for child nodes.
    Shared parent node that owns a local group of Child tasks 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 that sleep() and sleepUntil() block only the script — never the client (game-tick) thread.
    Abstract convenience base for single-tick task nodes.
    Runs TaskNodes in AutomationStage order.
    Base interface for all task nodes in the PrivBot task framework.
    Manages a flat list of TaskNodes and executes the highest-priority valid node each tick.
    Optional named integers for catalog and staged task trees.
    Optional read-only diagnostics.