Package org.spongepowered.api.event
Interface TristateResult
- All Known Subinterfaces:
BreedingEvent.FindMate
public interface TristateResult
Used for events that require a tri-state
TristateResult.Result.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether theTristateResult.Result.ALLOWcan be used.Returns the originalTristateResult.Resultof this event.result()Returns theTristateResult.Resultof this event.voidsetResult(TristateResult.Result value) Sets the result value for this event.
-
Method Details
-
hasAllowResult
boolean hasAllowResult()Returns whether theTristateResult.Result.ALLOWcan be used.- Returns:
- Whether allow can be used
-
originalResult
TristateResult.Result originalResult()Returns the originalTristateResult.Resultof this event.- Returns:
- The original result of this event
-
result
TristateResult.Result result()Returns theTristateResult.Resultof this event.- Returns:
- The result of this event
-
setResult
Sets the result value for this event.Note: The functionality of setting the
TristateResult.Resultis defined on a per-event basis.- Parameters:
value- The new result- Throws:
IllegalStateException- ifTristateResult.Result.ALLOWis given, buthasAllowResult()isfalse
-