Package marauroa.common.game
Enum Class Result
- All Implemented Interfaces:
Serializable
,Comparable<Result>
,Constable
This enum represent the possible values returned by the create account
process. Caller should verify that the process ended in OK_ACCOUNT_CREATED.
- Author:
- miguel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCharacter was not created because this character already exists.This server does not accept account creationAccount was not created because one of the important parameters was missing.Account was not created because there was an unspecified exception.Account was not created because an invalid characters (letter, sign, number) was usedThe template passed to the create character method is not valid because it fails to pass the RP rules.Server is offline, obviously not returned by the server but can be generated client side.Password is too weak.Password is too close to the usernameAccount was not created because this account already exists.Name is reservedAccount was not created because any of the parameters are either too long or too short.String is too longString is too shortToo many accounts were created from this ip-address recently.Account was created correctly. -
Method Summary
Modifier and TypeMethodDescriptionboolean
failed()
checks state of account creation represented by this result.getText()
Returns a textual description of the result.static Result
Returns the enum constant of this class with the specified name.static Result[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK_CREATED
Account was created correctly. -
FAILED_EMPTY_STRING
Account was not created because one of the important parameters was missing. -
FAILED_INVALID_CHARACTER_USED
Account was not created because an invalid characters (letter, sign, number) was used -
FAILED_STRING_SIZE
Account was not created because any of the parameters are either too long or too short. -
FAILED_PLAYER_EXISTS
Account was not created because this account already exists. -
FAILED_EXCEPTION
Account was not created because there was an unspecified exception. -
FAILED_CHARACTER_EXISTS
Character was not created because this character already exists. -
FAILED_INVALID_TEMPLATE
The template passed to the create character method is not valid because it fails to pass the RP rules. -
FAILED_STRING_TOO_SHORT
String is too short- Since:
- 2.1
-
FAILED_STRING_TOO_LONG
String is too long- Since:
- 2.1
-
FAILED_RESERVED_NAME
Name is reserved- Since:
- 2.1
-
FAILED_PASSWORD_TOO_CLOSE_TO_USERNAME
Password is too close to the username- Since:
- 2.1
-
FAILED_PASSWORD_TO_WEAK
Password is too weak.- Since:
- 2.1
-
FAILED_TOO_MANY
Too many accounts were created from this ip-address recently.- Since:
- 3.5
-
FAILED_OFFLINE
Server is offline, obviously not returned by the server but can be generated client side.- Since:
- 3.8.2
-
FAILED_CREATE_ON_MAIN_INSTEAD
This server does not accept account creation- Since:
- 3.8.4
-
-
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
-
failed
public boolean failed()checks state of account creation represented by this result.- Returns:
- true if account creation failed. false if account creation was successful.
-
getText
Returns a textual description of the result.- Returns:
- a textual description of the result.
-