ShardRunnable

class ShardRunnable(val task: ShardRunnable.() -> Unit, val async: Boolean = false, val delay: Long = 0) : BukkitRunnable

Constructors

Link copied to clipboard
constructor(task: ShardRunnable.() -> Unit, async: Boolean = false, delay: Long = 0)

Properties

Link copied to clipboard
Link copied to clipboard
val delay: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val taskId: Int

Functions

Link copied to clipboard
open fun cancel()
Link copied to clipboard
fun onComplete(delay: Long = 0, unit: TimeUnit = TimeUnit.MILLISECONDS, action: ShardRunnable.() -> Unit): ShardRunnable

Define a runnable to executed after the completion of this runnable, This runnable will run the same async state of the previous runnable

Link copied to clipboard
fun onCompleteAsync(delay: Long = 0, unit: TimeUnit = TimeUnit.MILLISECONDS, action: ShardRunnable.() -> Unit): ShardRunnable

Define a runnable to executed asynchronously after the completion of this runnable

Link copied to clipboard
fun onCompleteSync(delay: Long = 0, unit: TimeUnit = TimeUnit.MILLISECONDS, action: ShardRunnable.() -> Unit): ShardRunnable

Define a runnable to executed synchronously after the completion of this runnable

Link copied to clipboard
open override fun run()
Link copied to clipboard
@NotNull
open fun runTask(@NotNull plugin: @NotNull Plugin): @NotNull BukkitTask
Link copied to clipboard
@NotNull
open fun runTaskAsynchronously(@NotNull plugin: @NotNull Plugin): @NotNull BukkitTask
Link copied to clipboard
@NotNull
open fun runTaskLater(@NotNull plugin: @NotNull Plugin, delay: Long): @NotNull BukkitTask
Link copied to clipboard
@NotNull
open fun runTaskLaterAsynchronously(@NotNull plugin: @NotNull Plugin, delay: Long): @NotNull BukkitTask
Link copied to clipboard
@NotNull
open fun runTaskTimer(@NotNull plugin: @NotNull Plugin, delay: Long, period: Long): @NotNull BukkitTask
Link copied to clipboard
@NotNull
open fun runTaskTimerAsynchronously(@NotNull plugin: @NotNull Plugin, delay: Long, period: Long): @NotNull BukkitTask
Link copied to clipboard
fun schedule(delay: Long = 0): BukkitTask