Package org.spongepowered.api.event
Interface TristateResult
-
- All Known Subinterfaces:
BreedingEvent.FindMate
public interface TristateResult
Used for events that require a tri-stateTristateResult.Result
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TristateResult.Result
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasAllowResult()
Returns whether theTristateResult.Result.ALLOW
can be used.TristateResult.Result
originalResult()
Returns the originalTristateResult.Result
of this event.TristateResult.Result
result()
Returns theTristateResult.Result
of this event.void
setResult(TristateResult.Result value)
Sets the result value for this event.
-
-
-
Method Detail
-
hasAllowResult
boolean hasAllowResult()
Returns whether theTristateResult.Result.ALLOW
can be used.- Returns:
- Whether allow can be used
-
originalResult
TristateResult.Result originalResult()
Returns the originalTristateResult.Result
of this event.- Returns:
- The original result of this event
-
result
TristateResult.Result result()
Returns theTristateResult.Result
of this event.- Returns:
- The result of this event
-
setResult
void setResult(TristateResult.Result value) throws java.lang.IllegalStateException
Sets the result value for this event.Note: The functionality of setting the
TristateResult.Result
is defined on a per-event basis.- Parameters:
value
- The new result- Throws:
java.lang.IllegalStateException
- ifTristateResult.Result.ALLOW
is given, buthasAllowResult()
isfalse
-
-