Enum Class CommandResult

java.lang.Object
java.lang.Enum<CommandResult>
org.kingdoms.commands.CommandResult
All Implemented Interfaces:
Serializable, Comparable<CommandResult>, Constable

public enum CommandResult extends Enum<CommandResult>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    When an unhandled error occurred during command execution.
    When a command has failed to execute due to incorrect arguments, state, permissions, etc.
    When the command has executed successfully, but is expected to be run multiple times with different arguments or states.
    When the command has successfully executed with the correct arguments and state and the executor of the command got the desired results.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static CommandResult[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SUCCESS

      public static final CommandResult SUCCESS
      When the command has successfully executed with the correct arguments and state and the executor of the command got the desired results.
    • FAILED

      public static final CommandResult FAILED
      When a command has failed to execute due to incorrect arguments, state, permissions, etc.
    • PARTIAL

      public static final CommandResult PARTIAL
      When the command has executed successfully, but is expected to be run multiple times with different arguments or states. (This doesn't affect command cooldowns)
    • ERROR

      @Internal public static final CommandResult ERROR
      When an unhandled error occurred during command execution.
  • Method Details

    • values

      public static CommandResult[] 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 CommandResult 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