Enum Class Result

java.lang.Object
java.lang.Enum<Result>
marauroa.common.game.Result
All Implemented Interfaces:
Serializable, Comparable<Result>, Constable

public enum Result extends Enum<Result>
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
  • Enum Constant Details

    • OK_CREATED

      public static final Result OK_CREATED
      Account was created correctly.
    • FAILED_EMPTY_STRING

      public static final Result FAILED_EMPTY_STRING
      Account was not created because one of the important parameters was missing.
    • FAILED_INVALID_CHARACTER_USED

      public static final Result FAILED_INVALID_CHARACTER_USED
      Account was not created because an invalid characters (letter, sign, number) was used
    • FAILED_STRING_SIZE

      public static final Result FAILED_STRING_SIZE
      Account was not created because any of the parameters are either too long or too short.
    • FAILED_PLAYER_EXISTS

      public static final Result FAILED_PLAYER_EXISTS
      Account was not created because this account already exists.
    • FAILED_EXCEPTION

      public static final Result FAILED_EXCEPTION
      Account was not created because there was an unspecified exception.
    • FAILED_CHARACTER_EXISTS

      public static final Result FAILED_CHARACTER_EXISTS
      Character was not created because this character already exists.
    • FAILED_INVALID_TEMPLATE

      public static final Result 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

      public static final Result FAILED_STRING_TOO_SHORT
      String is too short
      Since:
      2.1
    • FAILED_STRING_TOO_LONG

      public static final Result FAILED_STRING_TOO_LONG
      String is too long
      Since:
      2.1
    • FAILED_RESERVED_NAME

      public static final Result FAILED_RESERVED_NAME
      Name is reserved
      Since:
      2.1
    • FAILED_PASSWORD_TOO_CLOSE_TO_USERNAME

      public static final Result FAILED_PASSWORD_TOO_CLOSE_TO_USERNAME
      Password is too close to the username
      Since:
      2.1
    • FAILED_PASSWORD_TO_WEAK

      public static final Result FAILED_PASSWORD_TO_WEAK
      Password is too weak.
      Since:
      2.1
    • FAILED_TOO_MANY

      public static final Result FAILED_TOO_MANY
      Too many accounts were created from this ip-address recently.
      Since:
      3.5
    • FAILED_OFFLINE

      public static final Result 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

      public static final Result FAILED_CREATE_ON_MAIN_INSTEAD
      This server does not accept account creation
      Since:
      3.8.4
  • Method Details

    • values

      public static 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 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
    • 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

      public String getText()
      Returns a textual description of the result.
      Returns:
      a textual description of the result.