listen

inline fun <T : Event> listen(priority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = false, register: Boolean = true, crossinline onEvent: (T) -> Unit): SingleListener<T>

Parameters

T

the type of event to listen to

priority

the priority when multiple listeners handle this event

ignoreCancelled

if manual cancellation should be ignored

register

if the event should be registered immediately

onEvent

the event callback