Package stawa.vitalstrike
Enum Class Errors.ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<Errors.ErrorCode>,Constable
- Enclosing class:
Errors
Enum representing different types of errors that can occur in VitalStrike.
Each error type has a unique numeric code and default message.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents an invalid command usage error with code 5000Represents a configuration-related error with code 3000Represents a database operation failure with code 2000Represents a network operation failure with code 7000Represents a permission denied error with code 6000Represents a player-related error with code 4000Represents a plugin operation failure with code 8000Represents an unknown or unspecified error with code 1000Represents an update operation failure with code 9000 -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Gets the numeric code associated with this error typeGets the default message associated with this error typestatic Errors.ErrorCodeReturns the enum constant of this class with the specified name.static Errors.ErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Represents an unknown or unspecified error with code 1000 -
DATABASE_ERROR
Represents a database operation failure with code 2000 -
CONFIG_ERROR
Represents a configuration-related error with code 3000 -
PLAYER_ERROR
Represents a player-related error with code 4000 -
COMMAND_ERROR
Represents an invalid command usage error with code 5000 -
PERMISSION_ERROR
Represents a permission denied error with code 6000 -
NETWORK_ERROR
Represents a network operation failure with code 7000 -
PLUGIN_ERROR
Represents a plugin operation failure with code 8000 -
UPDATE_ERROR
Represents an update operation failure with code 9000
-
-
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
-
getCode
public int getCode()Gets the numeric code associated with this error type- Returns:
- the error code
-
getDefaultMessage
Gets the default message associated with this error type- Returns:
- the default error message
-