Package org.spongepowered.api.event
Enum Class TristateResult.Result
- All Implemented Interfaces:
Serializable
,Comparable<TristateResult.Result>
,Constable
- Enclosing interface:
- TristateResult
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionForcibly execute the action of this event when it resolves, even if another condition would normally prevent this event from finishing normally.Let the event resolve with its normal behavior, as if the event was not handled at all.Disallow the event from resolving. -
Method Summary
Modifier and TypeMethodDescriptionstatic TristateResult.Result
Returns the enum constant of this class with the specified name.static TristateResult.Result[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DENY
Disallow the event from resolving.Note: Normally, this means cancelling or reverting the default behavior, but in some cases, especially when
TristateResult.hasAllowResult()
is true, this could be default behavior. -
DEFAULT
Let the event resolve with its normal behavior, as if the event was not handled at all.Note: This will fall back to the "vanilla" behavior for this event, or the plugin-defined behavior if it was originally created by a plugin.
-
ALLOW
Forcibly execute the action of this event when it resolves, even if another condition would normally prevent this event from finishing normally.Note that not all events have an overridable behavior, so
TristateResult.hasAllowResult()
should be checked before setting the result to ALLOW.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-