Class NecrifyEvent

java.lang.Object
de.jvstvshd.necrify.api.event.NecrifyEvent
Direct Known Subclasses:
NecrifyStateEvent, PunishmentLogEvent, UserEvent

public abstract class NecrifyEvent extends Object
Represents an event that can be dispatched by the EventDispatcher. All events must extend this class.
Since:
1.2.0
  • Constructor Details

    • NecrifyEvent

      public NecrifyEvent(String name)
      Creates a new event with the given name. The name should be unique and describe the event.
      Parameters:
      name - the name of the event.
  • Method Details

    • getName

      @NotNull public @NotNull String getName()
      Gets the name of this event. The name should be unique and describe the event.
      Returns:
      the name of this event.
    • cancel

      public final void cancel()
      Cancels the event. This will prevent the event from being executed further.
    • getOrigin

      public EventOrigin getOrigin()
      Gets the origin of this event.
      Returns:
      the origin of this event.
    • setOrigin

      public NecrifyEvent setOrigin(EventOrigin origin)
      Sets the origin of this event.
      Parameters:
      origin - the origin of this event.
      Returns:
      this event.