Annotation Type IsCancelled
-
@Target(METHOD) @Retention(RUNTIME) public @interface IsCancelled
Filters out events which do not match the specified cancellation state (represented by aTristate
). If the state is set to undefined then the listener will be called regardless of the cancellation state.If this annotation is not present then the behavior is as normal, which is to say that the listener is only called if the event is not cancelled.
The event type of the annotated event listener MUST be cancellable (eg. must extend
Cancellable
).
-
-
Element Detail
-
value
Tristate value
Gets the required cancellation state of the event for the annotated listener to be called.- Returns:
- The cancellation state
- Default:
- org.spongepowered.api.util.Tristate.TRUE
-
-