Event Bus
interface EventBus
Manages events and event handlers.
Functions
Link copied to clipboard
Registers all methods annotated with EventSubscribe as event handlers in the specified listener with the associated addon.
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.
Link copied to clipboard
Unregisters all event handlers associated with the specified addon.
Unregisters all methods annotated with EventSubscribe as event handlers in the specified listener with the associated addon.
abstract fun unregister(@NotNull addon: @NotNull Any, @NotNull handler: @NotNull EventHandler<out Any>)
Unregisters the specified event handler associated with the addon.