PlayerConnection Interface
Introduction#
The PlayerConnection interface provides information about a player's connection to the server.
Methods#
latency#
java
long latency();Description:
Gets the current latency (ping) of the player.
Returns:
The latency in milliseconds as a long.
latencyAverage#
java
double latencyAverage();Description:
Gets the average latency of the player over a period of time.
Returns:
The average latency in milliseconds as a double.
latencyDeviation#
java
double latencyDeviation();Description:
Gets the standard deviation of the player's latency.
Returns:
The latency deviation in milliseconds as a double.