Package org.spongepowered.api.event
Interface TristateResult
-
- All Known Subinterfaces:
BreedingEvent.FindMate
public interface TristateResultUsed for events that require a tri-stateTristateResult.Result.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTristateResult.Result
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasAllowResult()Returns whether theTristateResult.Result.ALLOWcan be used.TristateResult.ResultoriginalResult()Returns the originalTristateResult.Resultof this event.TristateResult.Resultresult()Returns theTristateResult.Resultof this event.voidsetResult(TristateResult.Result value)Sets the result value for this event.
-
-
-
Method Detail
-
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
void setResult(TristateResult.Result value) throws IllegalStateException
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
-
-