Class PlayerNetwork


  • public abstract class PlayerNetwork
    extends java.lang.Object
    Since:
    CAC v. 0.9991
    Author:
    Clientastisch
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayerNetwork()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract long getAveragePing()
      Returns the average ping of all network samples
      abstract long getAveragePing​(int length)
      Returns the average ping of an amount of network samples
      abstract long getCurrentPing()
      Returns the current ping of the player
      abstract long getNetworkDelay()
      Returns the whole network delay.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlayerNetwork

        public PlayerNetwork()
    • Method Detail

      • getCurrentPing

        public abstract long getCurrentPing()
        Returns the current ping of the player
        Returns:
        the current ping
      • getNetworkDelay

        public abstract long getNetworkDelay()
        Returns the whole network delay. That means how long a server request takes to be send back to the server itself
        Returns:
        the network delay
      • getAveragePing

        public abstract long getAveragePing()
        Returns the average ping of all network samples
        Returns:
        the average ping
      • getAveragePing

        public abstract long getAveragePing​(int length)
        Returns the average ping of an amount of network samples
        Parameters:
        length - the amount of samples
        Returns:
        the average of length samples