Package org.spongepowered.api.event
Enum TristateResult.Result
- java.lang.Object
-
- java.lang.Enum<TristateResult.Result>
-
- org.spongepowered.api.event.TristateResult.Result
-
- All Implemented Interfaces:
Serializable
,Comparable<TristateResult.Result>
- Enclosing interface:
- TristateResult
public static enum TristateResult.Result extends Enum<TristateResult.Result>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW
Forcibly execute the action of this event when it resolves, even if another condition would normally prevent this event from finishing normally.DEFAULT
Let the event resolve with its normal behavior, as if the event was not handled at all.DENY
Disallow the event from resolving.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TristateResult.Result
valueOf(String name)
Returns the enum constant of this type with the specified name.static TristateResult.Result[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DENY
public static final TristateResult.Result 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
public static final TristateResult.Result 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
public static final TristateResult.Result 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 Detail
-
values
public static TristateResult.Result[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TristateResult.Result c : TristateResult.Result.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TristateResult.Result valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-