Package-level declarations

Types

Link copied to clipboard
abstract class KListener<T : Event>(val priority: EventPriority, val ignoreCancelled: Boolean) : Listener

This class is our own custom Listener class, which is used to handle events more easily

Functions

Link copied to clipboard
inline fun <T : Event> listen(eventPriority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = true, shouldRegister: Boolean = true, crossinline consumer: (event: T) -> Unit): KListener<T>

This function is used to listen to an event

Link copied to clipboard
inline fun <T : Event> KListener<T>.register()

This function is used to register the listener

Link copied to clipboard
inline fun <T : Event> KListener<T>.unregister()

This function is used to unregister the listener