Package net.minestom.server.event
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 theEvent
should be cancelled or not.void
setCancelled(boolean cancel)
Marks theEvent
as cancelled or not.
-
Constructor Details
-
CancellableEvent
public CancellableEvent()
-
-
Method Details
-
isCancelled
public boolean isCancelled()Gets if theEvent
should be cancelled or not.- Returns:
- true if the
Event
should be cancelled
-
setCancelled
public void setCancelled(boolean cancel)Marks theEvent
as cancelled or not.- Parameters:
cancel
- true if theEvent
should be cancelled, false otherwise
-