Annotation Interface EventHandler
Marks a method as an event handler.
Methods annotated with @EventHandler will automatically be registered
as event listeners when the plugin is enabled. The method must have exactly
one
parameter which is the event type to listen for.
Usage Example:
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
getLogger().info("Player joined: " + event.getPlayerName());
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerChat(PlayerChatEvent event) {
// This handler runs with HIGH priority
}
- Since:
- 1.0.0
- Version:
- 1.0.4
- Author:
- HytaleLoader
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptioncom.hypixel.hytale.event.EventPriorityThe priority of this event handler.
-
Element Details
-
priority
com.hypixel.hytale.event.EventPriority priorityThe priority of this event handler.Higher priority handlers are executed first. Default is
EventPriority.NORMAL.- Returns:
- the event priority
- Default:
NORMAL
-