Class PlayerInfoData

java.lang.Object
com.comphenix.protocol.wrappers.PlayerInfoData

public class PlayerInfoData extends Object
Represents an immutable PlayerInfoData in the PLAYER_INFO packet.
Author:
dmulloy2
  • Constructor Details

  • Method Details

    • getProfile

      public WrappedGameProfile getProfile()
      Gets the GameProfile of the player represented by this data.
      Returns:
      The GameProfile
    • getPing

      @Deprecated public int getPing()
      Deprecated.
      Replaced by getLatency()
    • getLatency

      public int getLatency()
      Gets the latency between the client and the server.
      Returns:
      The latency
    • getGameMode

      public EnumWrappers.NativeGameMode getGameMode()
      Gets the GameMode of the player represented by this data.
      Returns:
      The GameMode
    • getDisplayName

      public WrappedChatComponent getDisplayName()
      Gets the display name of the player represented by this data.
      Returns:
      The display name
    • getConverter

      public static EquivalentConverter<PlayerInfoData> getConverter()
      Used to convert between NMS PlayerInfoData and the wrapper instance.
      Returns:
      A new converter.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object