Enum Class TristateResult.Result

java.lang.Object
java.lang.Enum<TristateResult.Result>
org.spongepowered.api.event.TristateResult.Result
All Implemented Interfaces:
Serializable, Comparable<TristateResult.Result>, Constable
Enclosing interface:
TristateResult

public static enum TristateResult.Result extends Enum<TristateResult.Result>
  • Enum Constant Details

    • 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 Details

    • values

      public static TristateResult.Result[] 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

      public static TristateResult.Result valueOf(String name)
      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 name
      NullPointerException - if the argument is null