Package org.spongepowered.api.network
Interface ServerPlayerConnection
-
- All Superinterfaces:
EngineConnection
,PlayerConnection
,RemoteConnection
,ServerSideConnection
public interface ServerPlayerConnection extends PlayerConnection, ServerSideConnection
Represents a connection of a client to the server where theServerPlayer
has successfully joined.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
latency()
Gets the connection latency.ServerPlayer
player()
Gets the associatedplayer
for this connection.-
Methods inherited from interface org.spongepowered.api.network.EngineConnection
close, close
-
Methods inherited from interface org.spongepowered.api.network.RemoteConnection
address, virtualHost
-
Methods inherited from interface org.spongepowered.api.network.ServerSideConnection
profile, side
-
-
-
-
Method Detail
-
player
ServerPlayer player()
Gets the associatedplayer
for this connection.- Specified by:
player
in interfacePlayerConnection
- Returns:
- The associated player
-
latency
int latency()
Gets the connection latency. This is constantly calculated by the server.- Returns:
- The latency
-
-