Class CancellableEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.CancellableEvent
Direct Known Subclasses:
AddEntityToInstanceEvent, EntityDamageEvent, EntityFireEvent, EntityItemMergeEvent, EntityVelocityEvent, InventoryOpenEvent, InventoryPreClickEvent, ItemDropEvent, PickupExperienceEvent, PickupItemEvent, PlayerAddItemStackEvent, PlayerBlockBreakEvent, PlayerBlockInteractEvent, PlayerBlockPlaceEvent, PlayerChangeHeldSlotEvent, PlayerChatEvent, PlayerCommandEvent, PlayerHandAnimationEvent, PlayerItemAnimationEvent, PlayerMoveEvent, PlayerPreEatEvent, PlayerSetItemStackEvent, PlayerStartDiggingEvent, PlayerSwapItemEvent, PlayerUseItemEvent, RemoveEntityFromInstanceEvent

public class CancellableEvent
extends Event
Represents an Event which can be cancelled.
  • Constructor Summary

    Constructors 
    Constructor Description
    CancellableEvent()  
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • isCancelled

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

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