Interface CancellableEvent

All Superinterfaces:
Event
All Known Implementing Classes:
AddEntityToInstanceEvent, BasicQueryEvent, ClientPingServerEvent, EntityDamageEvent, EntityFireExtinguishEvent, EntityItemMergeEvent, EntitySetFireEvent, EntityShootEvent, EntityVelocityEvent, FullQueryEvent, InventoryOpenEvent, InventoryPreClickEvent, ItemDropEvent, PickupExperienceEvent, PickupItemEvent, PlayerBlockBreakEvent, PlayerBlockInteractEvent, PlayerBlockPlaceEvent, PlayerChangeHeldSlotEvent, PlayerChatEvent, PlayerCommandEvent, PlayerGameModeChangeEvent, PlayerHandAnimationEvent, PlayerItemAnimationEvent, PlayerMoveEvent, PlayerPacketEvent, PlayerPacketOutEvent, PlayerPreEatEvent, PlayerStartDiggingEvent, PlayerSwapItemEvent, PlayerUseItemEvent, ProjectileCollideWithBlockEvent, ProjectileCollideWithEntityEvent, QueryEvent, ServerListPingEvent

public interface CancellableEvent extends Event
Represents an Event which can be cancelled. Called using EventDispatcher.callCancellable(CancellableEvent, Runnable).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets if the Event should be cancelled or not.
    void
    setCancelled(boolean cancel)
    Marks the Event as cancelled or not.
  • Method Details

    • isCancelled

      boolean isCancelled()
      Gets if the Event should be cancelled or not.
      Returns:
      true if the event should be cancelled
    • setCancelled

      void setCancelled(boolean cancel)
      Marks the Event as cancelled or not.
      Parameters:
      cancel - true if the event should be cancelled, false otherwise