Class CancellableEvent

java.lang.Object
dev.boze.api.event.CancellableEvent
Direct Known Subclasses:
EventRotate

public abstract class CancellableEvent extends Object
Base class for cancellable events

Cancellable events can be cancelled by addons to prevent the default behavior. Other addons can check if an event is cancelled to modify their behavior accordingly.
  • Constructor Details

    • CancellableEvent

      public CancellableEvent()
  • Method Details

    • cancel

      public void cancel()
      Cancels this event, preventing the default behavior
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets whether this event is cancelled
      Parameters:
      cancelled - Whether the event should be cancelled
    • isCancelled

      public boolean isCancelled()
      Returns whether this event has been cancelled
      Returns:
      true if the event is cancelled, false otherwise