Class EventPublisher
java.lang.Object
de.metaphoriker.pathetic.api.event.EventPublisher
Utility class for publishing and managing events using the Google Guava EventBus. This class
provides methods to raise events and register/unregister event listeners.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
raiseEvent
(PathingEvent pathingEvent) Raises an event by posting it to the EventBus.static void
registerListener
(Object listener) Registers an event listener with the EventBus.static void
unregisterListener
(Object listener) Unregisters an event listener from the EventBus.
-
Constructor Details
-
EventPublisher
public EventPublisher()
-
-
Method Details
-
raiseEvent
Raises an event by posting it to the EventBus.- Parameters:
pathingEvent
- the event to be raised
-
registerListener
Registers an event listener with the EventBus.- Parameters:
listener
- the listener to be registered
-
unregisterListener
Unregisters an event listener from the EventBus.- Parameters:
listener
- the listener to be unregistered
-