# Package net.axay.kspigot.runnables

## Types

ChainedRunnablePart
Link copied to clipboard
abstract class ChainedRunnablePart<T, R>(sync: Boolean)
Content copied to clipboard
ChainedRunnablePartFirst
Link copied to clipboard
class ChainedRunnablePartFirst<R>(runnable: () -> R, sync: Boolean) : ChainedRunnablePart<Unit, R>
Content copied to clipboard
ChainedRunnablePartThen
Link copied to clipboard
class ChainedRunnablePartThen<T, R>(runnable: (T) -> R, sync: Boolean, previous: ChainedRunnablePart<*, T>) : ChainedRunnablePart<T, R>
Content copied to clipboard
KSpigotRunnable
Link copied to clipboard
abstract class KSpigotRunnable(counterUp: Long?, counterDownToOne: Long?, counterDownToZero: Long?) : BukkitRunnable
Content copied to clipboard

## Functions

async
Link copied to clipboard
fun async(runnable: () -> Unit): BukkitTask
Content copied to clipboard
Starts an asynchronous task.
firstAsync
Link copied to clipboard
fun <R> firstAsync(runnable: () -> R): ChainedRunnablePartFirst<R>
Content copied to clipboard
firstDo
Link copied to clipboard
fun <R> firstDo(sync: Boolean, runnable: () -> R): ChainedRunnablePartFirst<R>
Content copied to clipboard
firstSync
Link copied to clipboard
fun <R> firstSync(runnable: () -> R): ChainedRunnablePartFirst<R>
Content copied to clipboard
sync
Link copied to clipboard
fun sync(runnable: () -> Unit): BukkitTask
Content copied to clipboard
Starts a synchronous task.
task
Link copied to clipboard
fun task(sync: Boolean = true, delay: Long = 0, period: Long? = null, howOften: Long? = null, safe: Boolean = false, endCallback: () -> Unit? = null, runnable: (KSpigotRunnable) -> Unit? = null): KSpigotRunnable?
Content copied to clipboard
Starts a new BukkitRunnable.
taskRun
Link copied to clipboard
fun taskRun(sync: Boolean = true, runnable: () -> Unit)
Content copied to clipboard
Executes the given runnable either sync or async (specified by the sync parameter).
taskRunLater
Link copied to clipboard
fun taskRunLater(delay: Long, sync: Boolean = true, runnable: () -> Unit)
Content copied to clipboard
Executes the given runnable with the given delay.
thenAsync
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenAsync(runnable: (R) -> U): ChainedRunnablePartThen<R, U>
Content copied to clipboard
thenDo
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenDo(sync: Boolean, runnable: (R) -> U): ChainedRunnablePartThen<R, U>
Content copied to clipboard
thenSync
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenSync(runnable: (R) -> U): ChainedRunnablePartThen<R, U>
Content copied to clipboard