subscribe
@NotNull
Subscribes a consumer to a specific event type.
Return
a listener handle that can be used to unregister the subscription
Since
2.0.0
Parameters
application
the application that subscribes to the event
eventClass
the class of the event to subscribe to
consumer
the consumer to handle the event
<T>
the type of the event