Annotation Interface EventHandler
Annotation to mark methods as event handlers in plugin classes.
Methods annotated with this will be automatically registered as event handlers.
Example usage:
@EventHandler(priority = EventPriority.NORMAL)
public void onMessageReceived(MessageReceivedEvent event) {
// Handle the event
}
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to ignore cancelled events.The priority of this event handler.
-
Element Details
-
priority
EventPriority priorityThe priority of this event handler.- Returns:
- the event priority
- Default:
NORMAL
-
ignoreCancelled
boolean ignoreCancelledWhether to ignore cancelled events.- Returns:
- true to ignore cancelled events
- Default:
false
-