runTask

abstract fun runTask(runnable: Runnable): ScheduledTask

Schedules a task to be executed on the next tick
Folia & Paper: ...on the global region
Bukkit: ...on the main thread

Parameters

runnable

The task to execute


open fun runTask(location: Location, runnable: Runnable): ScheduledTask

Folia & Paper: Schedules a task to be executed on the region which owns the location on the next tick
Bukkit: same as {@link #runTask(Runnable)}

Parameters

location

The location which the region executing should own

runnable

The task to execute


open fun runTask(entity: Entity, runnable: Runnable): ScheduledTask

Folia & Paper: Schedules a task to be executed on the region which owns the location of given entity on the next tick
Bukkit: same as {@link #runTask(Runnable)}

Parameters

entity

The entity whose location the region executing should own

runnable

The task to execute