taskTimer

fun World.taskTimer(plugin: Plugin, delay: Ticks, period: Ticks, task: () -> Unit): TaskHandle

Schedules a repeated task with the specified delay and period and tracks it for this World.

The task will be automatically cancelled when the world is unloaded.

Return

a TaskHandle that can be used to cancel the task

Parameters

plugin

the Plugin instance to schedule the task under

delay

the amount of time to wait before the first execution

period

the interval between subsequent executions

task

the block of code to execute