register
Registers all methods annotated with EventSubscribe as event handlers in the specified listener with the associated addon.
Parameters
addon
The addon to associate with the event handlers.
listener
The object with event handlers to register.
abstract fun <E : Event?> register(@NotNull addon: @NotNull Any, eventClass: Class<E>, priority: EventPriority, @NotNull handler: @NotNull EventHandler<E>)
Registers an event handler with the specified priority.
Parameters
addon
The addon to associate with the event handler.
event Class
The class of the event to handle.
priority
The priority of the event handler in execution.
handler
The event handler to register.
<E>
The type of the event.