Enum Class ConnectionState

java.lang.Object
java.lang.Enum<ConnectionState>
net.minestom.server.network.ConnectionState
All Implemented Interfaces:
Serializable, Comparable<ConnectionState>, Constable

public enum ConnectionState extends Enum<ConnectionState>
Represents the connection state of a client.
  • Enum Constant Details

    • HANDSHAKE

      public static final ConnectionState HANDSHAKE
      Default state before any packet is received.
    • STATUS

      public static final ConnectionState STATUS
      Client declares `Status` intent during handshake.
    • LOGIN

      public static final ConnectionState LOGIN
      Client declares `Login` intent during handshake.
    • CONFIGURATION

      public static final ConnectionState CONFIGURATION
      Client acknowledged login and is now configuring the game. Can also go back to configuration from play.
    • PLAY

      public static final ConnectionState PLAY
      Client (re-)finished configuration.
  • Method Details

    • values

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