public interface ProtocolInfo
Modifier and Type | Method and Description |
---|---|
ProtocolPipeline |
getPipeline()
Returns the user's pipeline.
|
int |
getProtocolVersion()
Returns the user's protocol version, or -1 if not set.
|
int |
getServerProtocolVersion()
Returns the server protocol version the user is connected to, or -1 if not set.
|
State |
getState()
Returns the protocol state the user is currently in.
|
UserConnection |
getUser()
Deprecated.
|
@Nullable java.lang.String |
getUsername()
Returns the username associated with this connection.
|
@Nullable java.util.UUID |
getUuid()
Returns the uuid associated with this connection.
|
void |
setPipeline(ProtocolPipeline pipeline) |
void |
setProtocolVersion(int protocolVersion) |
void |
setServerProtocolVersion(int serverProtocolVersion) |
void |
setState(State state) |
void |
setUsername(java.lang.String username) |
void |
setUuid(java.util.UUID uuid) |
State getState()
void setState(State state)
int getProtocolVersion()
State.HANDSHAKE
state.void setProtocolVersion(int protocolVersion)
int getServerProtocolVersion()
State.HANDSHAKE
state.void setServerProtocolVersion(int serverProtocolVersion)
@Nullable java.lang.String getUsername()
State.PLAY
state.State.PLAY
statevoid setUsername(java.lang.String username)
@Nullable java.util.UUID getUuid()
State.PLAY
state.State.PLAY
statevoid setUuid(java.util.UUID uuid)
ProtocolPipeline getPipeline()
void setPipeline(ProtocolPipeline pipeline)
@Deprecated UserConnection getUser()