Interface ServerConnection
- All Superinterfaces:
ChannelMessageSink, ChannelMessageSource
Represents a connection to a backend server from the proxy for a client.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the player that this connection is associated with.Returns the server that the player associated with this connection was connected to before switching to this connection.Returns the server that this connection is connected to.Returns the server info for this connection.booleanReturns whether the client notified this connection of having loaded the world.Methods inherited from interface ChannelMessageSink
sendPluginMessage, sendPluginMessage
-
Method Details
-
getServer
RegisteredServer getServer()Returns the server that this connection is connected to.- Returns:
- the server this connection is connected to
-
getPreviousServer
Optional<RegisteredServer> getPreviousServer()Returns the server that the player associated with this connection was connected to before switching to this connection.- Returns:
- the server the player was connected to.
-
getServerInfo
ServerInfo getServerInfo()Returns the server info for this connection.- Returns:
- the server info for this connection
-
isClientLoaded
Returns whether the client notified this connection of having loaded the world.- Returns:
- true if the client has loaded the world
- Since:
- 4.1.0
- Implementation Note:
- This is purely client-dependent; see
PlayerClientLoadedWorldEvent. - Since Minecraft:
- 1.21.4
-
getPlayer
Player getPlayer()Returns the player that this connection is associated with.- Returns:
- the player for this connection
-