Scheduler
endstone.scheduler
¶
Classes:
Name | Description |
---|---|
Scheduler |
Represents a scheduler that executes various tasks |
Task |
Represents a task being executed by the scheduler |
Scheduler
¶
Represents a scheduler that executes various tasks
Methods:
Name | Description |
---|---|
cancel_task |
Removes task from scheduler. |
cancel_tasks |
Removes all tasks associated with a particular plugin from the scheduler. |
get_pending_tasks |
Returns a vector of all pending tasks. |
is_queued |
Check if the task queued to be run later. |
is_running |
Check if the task currently running. |
run_task |
Returns a task that will be executed synchronously |
cancel_tasks
¶
Removes all tasks associated with a particular plugin from the scheduler.
Task
¶
Represents a task being executed by the scheduler
Methods:
Name | Description |
---|---|
cancel |
Attempts to cancel this task. |
Attributes:
Name | Type | Description |
---|---|---|
is_cancelled |
bool
|
Returns true if the task has been cancelled. |
is_sync |
bool
|
Returns true if the task is run by server thread. |
owner |
Plugin
|
Returns the Plugin that owns the task. |
task_id |
int
|
Returns the task id. |