TaskManager

class TaskManager(plugin: Plugin)

Manages scheduled tasks and their lifecycle.

This class is responsible for tracking active tasks and automatically cancelling them when certain events occur, such as a player quitting or a world unloading.

Parameters

plugin

the Plugin instance associated with this manager

Constructors

Link copied to clipboard
constructor(plugin: Plugin)

Functions

Link copied to clipboard
fun cancelAll()

Cancels all tracked tasks.

Link copied to clipboard
fun track(handle: TaskHandle)

Tracks the specified task handle.

Link copied to clipboard
fun trackPlayer(player: Player, handle: TaskHandle)

Tracks the specified task handle for the player.

Link copied to clipboard
fun trackWorld(world: World, handle: TaskHandle)

Tracks the specified task handle for the world.