Package net.luckperms.api.event.type
Interface Cancellable
- All Known Subinterfaces:
LogBroadcastEvent,LogNetworkPublishEvent,LogNotifyEvent,LogPublishEvent,PreNetworkSyncEvent,PreSyncEvent,UserUnloadEvent
public interface Cancellable
Represents an event that can be cancelled
-
Method Summary
Modifier and TypeMethodDescriptionGets anAtomicBooleanholding the cancellation state of the eventdefault booleanReturns true if the event is currently cancelled.default booleanReturns true if the event is not currently cancelled.default booleansetCancelled(boolean cancelled) Sets the cancellation state of the event.
-
Method Details
-
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
-