endstone.scheduler
Classes relating to letting plugins run code at specific time intervals.
Classes relating to letting plugins run code at specific time intervals.
Classes
classScheduler
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 |
methcancel_task
cancel_task(id: int) -> NoneRemoves task from scheduler.
methcancel_tasks
cancel_tasks(plugin: Plugin) -> NoneRemoves all tasks associated with a particular plugin from the scheduler.
methget_pending_tasks
Returns a vector of all pending tasks.
methis_queued
Check if the task queued to be run later.
methis_running
Check if the task currently running.
methrun_task
Returns a task that will be executed synchronously
classTask
Task()Represents a task being executed by the scheduler
Methods
| Name | Description |
|---|---|
cancel | Attempts to cancel this task. |
Attributes
attris_cancelledproperty
is_cancelled: boolReturns true if the task has been cancelled.
attris_syncproperty
is_sync: boolReturns true if the task is run by server thread.
attrownerproperty
owner: PluginReturns the Plugin that owns the task.
attrtask_idproperty
task_id: intReturns the task id.
methcancel
cancel() -> NoneAttempts to cancel this task.