Enum Class ClientState

java.lang.Object
java.lang.Enum<ClientState>
marauroa.server.game.container.ClientState
All Implemented Interfaces:
Serializable, Comparable<ClientState>, Constable

public enum ClientState extends Enum<ClientState>
This enum describe one of the possible state of the client. When the client starts it has no state, once it connects to server it is assigned CONNECTION_ACCEPTED state until it logins successfully so it is moved to LOGIN_COMPLETE. As soon as it chooses a character it is moved to GAME_BEGIN state which it will only leave when logout is accepted, LOGOUT_ACCEPTED.
  • Enum Constant Details

    • CONNECTION_ACCEPTED

      public static final ClientState CONNECTION_ACCEPTED
      Connection is accepted but login stage is not completed.
    • LOGIN_COMPLETE

      public static final ClientState LOGIN_COMPLETE
      Login identification is completed but still choosing character-
    • GAME_BEGIN

      public static final ClientState GAME_BEGIN
      Client is already playing.
    • LOGOUT_ACCEPTED

      public static final ClientState LOGOUT_ACCEPTED
      The client has requested logout and the petition is accepted
  • Method Details

    • values

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