Package net.axay.kspigot.runnables

Types

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

Functions

async
Link copied to clipboard
fun async(runnable: () -> Unit): BukkitTask
Starts an asynchronous task.
firstAsync
Link copied to clipboard
fun <R> firstAsync(runnable: () -> R): ChainedRunnablePartFirst<R>
firstDo
Link copied to clipboard
fun <R> firstDo(sync: Boolean, runnable: () -> R): ChainedRunnablePartFirst<R>
firstSync
Link copied to clipboard
fun <R> firstSync(runnable: () -> R): ChainedRunnablePartFirst<R>
sync
Link copied to clipboard
fun sync(runnable: () -> Unit): BukkitTask
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?
Starts a new BukkitRunnable.
taskRun
Link copied to clipboard
fun taskRun(sync: Boolean = true, runnable: () -> Unit)
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)
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>
thenDo
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenDo(sync: Boolean, runnable: (R) -> U): ChainedRunnablePartThen<R, U>
thenSync
Link copied to clipboard
fun <T, R, U> ChainedRunnablePart<T, R>.thenSync(runnable: (R) -> U): ChainedRunnablePartThen<R, U>