runTaskLater

abstract fun runTaskLater(runnable: Runnable, delay: Long): ScheduledTask

Schedules a task to be executed after the specified delay in ticks
Folia & Paper: ...on the global region
Bukkit: ...on the main thread

Parameters

runnable

The task to execute

delay

The delay, in ticks


open fun runTaskLater(location: Location, runnable: Runnable, delay: Long): ScheduledTask

Folia & Paper: Schedules a task to be executed on the region which owns the location after the specified delay in ticks
Bukkit: same as {@link #runTaskLater(Runnable, long)}

Parameters

location

The location which the region executing should own

runnable

The task to execute

delay

The delay, in ticks.


open fun runTaskLater(entity: Entity, runnable: Runnable, delay: Long): ScheduledTask

Folia & Paper: Schedules a task to be executed on the region which owns the location of given entity after the specified delay in ticks
Bukkit: same as {@link #runTaskLater(Runnable, long)}

Parameters

entity

The entity whose location the region executing should own

runnable

The task to execute

delay

The delay, in ticks.