Enum Class ProtocolState
- All Implemented Interfaces:
Serializable
,Comparable<ProtocolState>
,Constable
- Since:
- 3.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionConfiguration State of a connection.Initial connection State.Authentication State of a connection.Game State of a connection.Ping State of a connection. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolState
Returns the enum constant of this class with the specified name.static ProtocolState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HANDSHAKE
Initial connection State.This status can be caused by a
If the intent is LOGIN or TRANSFER, the next state will beHandshakeIntent.STATUS
,HandshakeIntent.LOGIN
orHandshakeIntent.TRANSFER
intent.LOGIN
, otherwise, it will go to theSTATUS
state. -
STATUS
Ping State of a connection.Connections with the
HandshakeIntent.STATUS
intent will pass through this state and be disconnected after it requests the ping from the server and the server responds with the respective ping. -
LOGIN
Authentication State of a connection.At this moment the player is authenticating with the authentication servers.
-
CONFIGURATION
Configuration State of a connection.At this point the player allows the server to send information such as resource packs and plugin messages, at the same time the player will send his client brand and the respective plugin messages if it is a modded client.
- Since Minecraft:
- 1.20.2
-
PLAY
Game State of a connection.In this state is where the whole game runs, the server is able to change the player's state to
CONFIGURATION
as needed in versions 1.20.2 and higher.
-
-
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
-