Class EventScanner
java.lang.Object
fr.hytale.loader.event.EventScanner
Utility class for scanning and registering event handlers.
This class automatically discovers methods annotated with
EventHandler
and registers them with the Hytale event bus. It handles both sync and async
events, as well as event priorities.
- Since:
- 1.0.0
- Version:
- 1.0.4
- Author:
- HytaleLoader
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidregisterListeners(SimplePlugin plugin, SimpleListener listener) Registers all event handler methods in a listener object.
-
Constructor Details
-
EventScanner
public EventScanner()
-
-
Method Details
-
registerListeners
Registers all event handler methods in a listener object.Scans the listener for methods annotated with
EventHandlerand automatically registers them with the plugin's event registry.- Parameters:
plugin- the plugin that owns this listenerlistener- the object containing event handler methods
-