Class NotificationEvent

java.lang.Object
civitas.celestis.event.Event
civitas.celestis.event.notification.NotificationEvent
All Implemented Interfaces:
Handleable, Unique<UUID>

public class NotificationEvent extends Event
An event called to notify the entire application that a certain action has been performed. All subclasses of this event will be sent to every listener which listens to NotificationEvent.
See Also:
  • Field Details

    • message

      @Nonnull protected final String message
      The message of this notification. If no message is specified, the value will be an empty string. ("")
  • Constructor Details

    • NotificationEvent

      public NotificationEvent()
      Creates a new notification event with no message and no cause.
    • NotificationEvent

      public NotificationEvent(@Nullable Handleable cause)
      Creates a new notification event with no message.
      Parameters:
      cause - The cause of this event
    • NotificationEvent

      public NotificationEvent(@Nonnull String message)
      Creates a new notification event with no cause.
      Parameters:
      message - The message of this notification
    • NotificationEvent

      public NotificationEvent(@Nonnull String message, @Nullable Handleable cause)
      Creates a new notification event.
      Parameters:
      message - The message of this notification
      cause - The cause of this event
  • Method Details

    • getMessage

      @Nonnull public String getMessage()
      Returns the message of this notification. If no message is specified, this will return "".
      Returns:
      The message of this notification