Class ServerPing.SamplePlayer

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

public static final class ServerPing.SamplePlayer extends Object
A player returned in the sample field of the server ping players field.
  • Field Details

    • ANONYMOUS

      public static final ServerPing.SamplePlayer ANONYMOUS
      A constant representing an anonymous sample player with a null UUID and generic name.
  • Constructor Details

    • SamplePlayer

      public SamplePlayer(String name, UUID id)
      Constructs a SamplePlayer with the given name and UUID.
      Parameters:
      name - the name of the player
      id - the UUID of the player
  • Method Details

    • getName

      public String getName()
      Gets the legacy string name of the sample player.
      Returns:
      the player name
    • getId

      public UUID getId()
      Gets the UUID of the sample player.
      Returns:
      the player UUID
    • 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