Interface Event.Result
- Enclosing interface:
- Event
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The result of executing an event's handlers.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanfailed()Inverse ofsuccessful()static Event.ResultofCancellable(CancellableEvent event) default @Nullable Stringreason()The reason given for this result.booleanWhether the handlers were successful.static Event.ResultwithReason(boolean success, String reason)
-
Field Details
-
SUCCESS
-
FAILURE
-
-
Method Details
-
ofCancellable
-
withReason
-
successful
boolean successful()Whether the handlers were successful. If false, the event should be considered cancelled and native execution should be stopped where possible. -
failed
default boolean failed()Inverse ofsuccessful() -
reason
The reason given for this result. May be null.
-