Annotation to subscribe a method to an
Event
This annotation can only be applied to single parameter methods, where the single parameter is a subclass of
Event.
Use IEventBus.register(Object) to submit either an Object instance or a Class to the event bus
for scanning to generate callback EventListener wrappers.
The Event Bus system generates an ASM wrapper that dispatches to the marked method.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReturns the priority to subscribe this listener with.booleanReturns whether this listener should receive cancelled events.
-
Element Details
-
priority
EventPriority priorityReturns the priority to subscribe this listener with.- Returns:
- the priority to subscribe this listener with
- Default:
- NORMAL
-
receiveCanceled
boolean receiveCanceledReturns whether this listener should receive cancelled events.- Returns:
- whether this listener should receive cancelled events
- Default:
- false
-