Package kr.toxicity.model.api.event
Interface CancellableEvent
- All Superinterfaces:
ModelEvent
- All Known Implementing Classes:
DismountModelEvent,HitBoxDamagedEvent,HitBoxInteractAtEvent,HitBoxInteractEvent,ModelSpawnAtPlayerEvent,MountModelEvent,PlayerHideTrackerEvent,PlayerShowTrackerEvent,RemovePlayerSkinEvent
Represents an event that can be canceled.
Cancelling an event typically prevents the associated action from completing.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancall()Dispatches this event to the global event bus.booleanChecks if the event has been canceled.voidsetCancelled(boolean cancel) Sets the cancellation state of the event.
-
Method Details
-
isCancelled
boolean isCancelled()Checks if the event has been canceled.- Returns:
- true if canceled, false otherwise
- Since:
- 2.0.0
-
setCancelled
void setCancelled(boolean cancel) Sets the cancellation state of the event.- Parameters:
cancel- true to cancel the event, false to allow it- Since:
- 2.0.0
-
call
default boolean call()Description copied from interface:ModelEventDispatches this event to the global event bus.- Specified by:
callin interfaceModelEvent- Returns:
- the event is successfully triggered
-