Class ServerPing.Players

java.lang.Object
com.velocitypowered.api.proxy.server.ServerPing.Players
Enclosing class:
ServerPing

public static final class ServerPing.Players extends Object
Represents what the players the server purports to have online, its maximum capacity, and a sample of players on the server.
  • Constructor Details

    • Players

      public Players(int online, int max, List<ServerPing.SamplePlayer> sample)
      Creates a new instance.
      Parameters:
      online - the number of online players
      max - the maximum number of players
      sample - a sample of players on the server
  • Method Details

    • getOnline

      public int getOnline()
      Gets the number of online players.
      Returns:
      the number of online players
    • getMax

      public int getMax()
      Gets the maximum number of players the server claims it can hold.
      Returns:
      the maximum number of players
    • getSample

      public List<ServerPing.SamplePlayer> getSample()
      Gets a sample list of online players.
      Returns:
      the sample players
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object