SpigotTasksModule

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val description: ModuleDescription

The module description. This is used to get information about the module.

Link copied to clipboard
val scheduler: BukkitScheduler

Instance of the BukkitScheduler (Spigot Scheduler)

Functions

Link copied to clipboard
open override fun onDisable()

This method is called when the module is unloaded.

Link copied to clipboard
open override fun onEnable()

This method is called when the module is loaded.

Link copied to clipboard
fun runTask(task: () -> Unit): BukkitTask

Runs a task after 1 tick (0.05 seconds)

Link copied to clipboard
fun runTaskAsynchronously(task: () -> Unit): BukkitTask

Runs an async task after 1 tick (0.05 seconds)

Link copied to clipboard
fun runTaskLater(ticks: Long = 1, task: () -> Unit): BukkitTask

Runs a task after the given ticks (1 tick = 0.05 seconds)

Link copied to clipboard
fun runTaskLaterAsynchronously(ticks: Long = 1, task: () -> Unit): BukkitTask

Runs an async task after the given ticks (1 tick = 0.05 seconds)

Link copied to clipboard
fun runTaskTimer(period: Long = 1, delay: Long = 1, task: () -> Unit): RecurringTask

Runs a repeating task every given ticks (1 tick = 0.05 seconds) after the given ticks (1 tick = 0.05 seconds)

Link copied to clipboard
fun runTaskTimerAsynchronously(period: Long = 1, delay: Long = 1, task: () -> Unit): RecurringTask

Runs a repeating task asynchronously every given ticks (1 tick = 0.05 seconds) after the given ticks (1 tick = 0.05 seconds)