Class EventPublisher

java.lang.Object
de.metaphoriker.pathetic.api.event.EventPublisher

public class EventPublisher extends Object
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 Details

    • EventPublisher

      public EventPublisher()
  • Method Details

    • raiseEvent

      public static void raiseEvent(PathingEvent pathingEvent)
      Raises an event by posting it to the EventBus.
      Parameters:
      pathingEvent - the event to be raised
    • registerListener

      public static void registerListener(Object listener)
      Registers an event listener with the EventBus.
      Parameters:
      listener - the listener to be registered
    • unregisterListener

      public static void unregisterListener(Object listener)
      Unregisters an event listener from the EventBus.
      Parameters:
      listener - the listener to be unregistered