Enum Class SessionDefineNetworkChannelsEvent.State
java.lang.Object
java.lang.Enum<SessionDefineNetworkChannelsEvent.State>
org.geysermc.geyser.api.event.bedrock.SessionDefineNetworkChannelsEvent.State
- All Implemented Interfaces:
Serializable,Comparable<SessionDefineNetworkChannelsEvent.State>,Constable
- Enclosing class:
SessionDefineNetworkChannelsEvent
public static enum SessionDefineNetworkChannelsEvent.State
extends Enum<SessionDefineNetworkChannelsEvent.State>
The state of the connection at the time of channel registration.
This allows for checking what state the client is in before registering channels, which offers greater flexibility and control for extensions that need to register channels.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCalled when a Bedrock session is fully authenticated and has completed the Bedrock login process.Called when a session is created.Called when a session is FIRST initialized.Called once a session has logged into the Java server. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CREATED
Called when a session is created. This is the earliest point at which channels can be registered. This is a VERY early point in the connection, meaning very little to no information about the client is available yet.It is only recommended to listen for this state if you are creating a developer tool such as a packet logger, or creating proxy software where the Geyser instance is not exposed to the public internet. It is assumed that in this scenario, the proxy software has taken all precautions to ensure that the client is not malicious.
-
INITIALIZED
Called when a session is FIRST initialized. The session may lack certain information at this point, such as the Java session information, or verifiable Bedrock client info. This is the earliest point when it is guaranteed a session will have a protocol version. -
AUTHENTICATED
Called when a Bedrock session is fully authenticated and has completed the Bedrock login process. At this point, the session will not have yet logged into the Java server, so Java client information will still be unavailable. -
LOGGED_IN
Called once a session has logged into the Java server. At this point, the session can be considered fully established, and all information about the client and connection will be available. This is the latest point at which channels can be registered.
-
-
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
-