Enum TristateResult.Result

    • 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 name
        NullPointerException - if the argument is null