1.6 KiB
1.6 KiB
title
title |
---|
task - |
//KSpigot/net.axay.kspigot.runnables/task
task
[jvm]
Brief description
Starts a new BukkitRunnable.
Parameters
jvm
Name | Summary |
---|---|
delay | the delay (in ticks) until the first execution of the task |
endCallback | code that should always be executed when the runnable ends |
howOften | how many times the task should be executed - null for infinite execution |
period | at which interval (in ticks) the task should be repeated |
runnable | the runnable which should be executed each repetition |
safe | if the endCallback of the runnable should always be executed, even if the server shuts down or the runnable ends prematurely |
sync | if the runnable should run sync (true) or async (false) |
Content
fun task(sync: Boolean, delay: Long, period: Long?, howOften: Long?, safe: Boolean, endCallback: () -> Unit?, runnable: (KSpigotRunnable) -> Unit?)