Companion

object Companion

Functions

Link copied to clipboard

Creates a new event listener builder for events of the given eventType.

Link copied to clipboard

Creates a new event listener builder for events of the given event type T.

Link copied to clipboard
fun <T : Event> of(eventType: Class<T>, handler: Consumer<T>): EventListener<T>

Creates a new event listener that listens for events of the given eventType, running the given handler when an event of the correct type is fired.

Link copied to clipboard
inline fun <T : Event> EventListener.Companion.of(crossinline handler: (T) -> Unit): EventListener<T>

Creates a new event listener that listens for events of the given event type T, running the given handler when an event of the correct type is fired.