Package net.luckperms.api.event.type
Interface Cancellable
-
- All Known Subinterfaces:
LogBroadcastEvent,LogNetworkPublishEvent,LogNotifyEvent,LogPublishEvent,PreNetworkSyncEvent,PreSyncEvent,UserUnloadEvent
public interface CancellableRepresents an event that can be cancelled
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull AtomicBooleancancellationState()Gets anAtomicBooleanholding the cancellation state of the eventdefault booleanisCancelled()Returns true if the event is currently cancelled.default booleanisNotCancelled()Returns true if the event is not currently cancelled.default booleansetCancelled(boolean cancelled)Sets the cancellation state of the event.
-
-
-
Method Detail
-
cancellationState
@NonNull AtomicBoolean cancellationState()
Gets anAtomicBooleanholding the cancellation state of the event- Returns:
- the cancellation
-
isCancelled
default boolean isCancelled()
Returns true if the event is currently cancelled.- Returns:
- if the event is cancelled
-
isNotCancelled
default boolean isNotCancelled()
Returns true if the event is not currently cancelled.- Returns:
- if the event is not cancelled
-
setCancelled
default boolean setCancelled(boolean cancelled)
Sets the cancellation state of the event.- Parameters:
cancelled- the new state- Returns:
- the previous state
-
-