Class PlayerInfoData

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

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

  • Method Details

    • getProfileId

      public UUID getProfileId()
      Get the id of the affected profile (since 1.19.3)
      Returns:
      the id of the profile
    • 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
    • isListed

      public boolean isListed()
      Gets if the player is listed on the client (since 1.19.3)
      Returns:
      if the player is listed
    • 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
    • isShowHat

      public boolean isShowHat()
      Gets if a hat is shown (since 1.21.4)
      Returns:
      if the hat is shown
    • getListOrder

      public int getListOrder()
      Gets the priority of this entry in the tab list (since 1.21.2)
      Returns:
      the priority of this entry in the tab list
    • getProfileKeyData

      @Nullable public WrappedProfilePublicKey.WrappedProfileKeyData getProfileKeyData()
      Returns the public key of the profile (since 1.19). Returns the public key of the remote chat session since 1.19.3
      Returns:
      The public key of the profile.
    • getRemoteChatSessionData

      @Nullable public WrappedRemoteChatSessionData getRemoteChatSessionData()
      Returns the remoteChatSessionData (since 1.19.3)
      Returns:
      The remote chat sesion data or null
    • 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