Package net.axay.kspigot.runnables

Types

ChainedRunnablePart
Link copied to clipboard
class ChainedRunnablePart<T, R>(plugin: Plugin, runnable: (T?) -> R, sync: Boolean, previous: ChainedRunnablePart<*, T>?, next: ChainedRunnablePart<R, *>?)
KRunnableHolder
Link copied to clipboard
class KRunnableHolder : AutoCloseable
KSpigotRunnable
Link copied to clipboard
abstract class KSpigotRunnable(counterUp: Long?, counterDownToOne: Long?, counterDownToZero: Long?) : BukkitRunnable

Functions

async
Link copied to clipboard

Starts an asynchronous task.

fun Plugin.async(runnable: () -> Unit): BukkitTask
firstAsync
Link copied to clipboard
fun <R> Plugin.firstAsync(runnable: (Unit?) -> R): ChainedRunnablePart<Unit, R>
firstDo
Link copied to clipboard
fun <R> Plugin.firstDo(sync: Boolean, runnable: (Unit?) -> R): ChainedRunnablePart<Unit, R>
firstSync
Link copied to clipboard
fun <R> Plugin.firstSync(runnable: (Unit?) -> R): ChainedRunnablePart<Unit, R>
sync
Link copied to clipboard

Starts a synchronous task.

fun Plugin.sync(runnable: () -> Unit): BukkitTask
task
Link copied to clipboard

Starts a new BukkitRunnable.

fun KSpigot.task(sync: Boolean, delay: Long, period: Long?, howOften: Long?, safe: Boolean, endCallback: () -> Unit?, runnable: (KSpigotRunnable) -> Unit?)
thenAsync
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenAsync(runnable: (R?) -> U): ChainedRunnablePart<R, U>
thenDo
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenDo(sync: Boolean, runnable: (R?) -> U): ChainedRunnablePart<R, U>
thenSync
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenSync(runnable: (R?) -> U): ChainedRunnablePart<R, U>