subscribe
abstract fun <E : Event> subscribe(type: Class<E>, listener: EventListener<E>, priority: EventPriority, ignoreCancelled: Boolean): EventSubscription
Subscribes a listener for a specific event type.
Parameters
type
the exact event class to subscribe to
priority
relative order of invocation
ignoreCancelled
if true, the listener is skipped when event is Cancellable and cancelled
Java-friendly overload: defaults to EventPriority.NORMAL, not ignoring cancelled events.
open fun <E : Event> subscribe(type: Class<E>, priority: EventPriority, listener: EventListener<E>): EventSubscription
Java-friendly overload: defaults to not ignoring cancelled events.