Class CommandPostProcessEvent<S extends CommandSource>

java.lang.Object
studio.mevera.imperat.events.CommandEvent<S>
studio.mevera.imperat.events.types.CommandPostProcessEvent<S>
All Implemented Interfaces:
CancellableEvent, Event

public class CommandPostProcessEvent<S extends CommandSource> extends CommandEvent<S> implements CancellableEvent
  • Constructor Details

    • CommandPostProcessEvent

      public CommandPostProcessEvent(Command<S> command, ExecutionContext<S> context)
      Constructs a new command event.
      Parameters:
      command - the command associated with this event
  • Method Details

    • getContext

      public ExecutionContext<S> getContext()
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: CancellableEvent
      Checks if this event has been cancelled.
      Specified by:
      isCancelled in interface CancellableEvent
      Returns:
      true if the event is cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: CancellableEvent
      Sets the cancellation state of this event.

      Setting this to true typically indicates that the main action associated with this event should not proceed. However, handlers must explicitly check CancellableEvent.isCancelled() and decide how to respond.

      Specified by:
      setCancelled in interface CancellableEvent
      Parameters:
      cancelled - true to cancel the event, false to un-cancel it