Interface InboundConnection
- All Known Subinterfaces:
LoginPhaseConnection, Player
public interface InboundConnection
Represents an incoming connection to the proxy.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the initial intent for the connection.Returns the current protocol state of this connection.Returns the current protocol version this connection uses.Returns the raw hostname that the client sent, if applicable.Returns the player's IP address.Returns the unique, stable session UUID for this connection, generated when the client initially connects to the proxy.Returns the hostname that the user entered into the client, if applicable.booleanisActive()Determine whether or not the player remains online.
-
Method Details
-
getRemoteAddress
-
getVirtualHost
Optional<InetSocketAddress> getVirtualHost()Returns the hostname that the user entered into the client, if applicable.
This is partially processed, including removing a trailing dot, and discarding data after a null byte.- Returns:
- the hostname from the client
-
getRawVirtualHost
-
isActive
boolean isActive()Determine whether or not the player remains online.- Returns:
- whether or not the player active
-
getProtocolVersion
ProtocolVersion getProtocolVersion()Returns the current protocol version this connection uses.- Returns:
- the protocol version the connection uses
-
getProtocolState
ProtocolState getProtocolState()Returns the current protocol state of this connection.- Returns:
- the protocol state of the connection
-
getHandshakeIntent
HandshakeIntent getHandshakeIntent()Returns the initial intent for the connection.- Returns:
- the intent of the connection
-
getSessionId
UUID getSessionId()Returns the unique, stable session UUID for this connection, generated when the client initially connects to the proxy. The session id remains consistent across all login-phase events and all proxy-to-backend connections for the same player session.A session is bound to a single client connection: if the player disconnects and reconnects (or is transferred back to the proxy), a new session id is generated.
This should not be confused with Mojang's server-wide play session ID introduced in Minecraft 26.2.
- Returns:
- the session UUID, never
null - Since:
- 4.2.1
-