Package com.comphenix.protocol.wrappers
Class PlayerInfoData
java.lang.Object
com.comphenix.protocol.wrappers.PlayerInfoData
Represents an immutable PlayerInfoData in the PLAYER_INFO packet.
- Author:
- dmulloy2
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerInfoData(WrappedGameProfile profile, int latency, EnumWrappers.NativeGameMode gameMode, WrappedChatComponent displayName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic EquivalentConverter<PlayerInfoData>Used to convert between NMS PlayerInfoData and the wrapper instance.Gets the display name of the player represented by this data.Gets the GameMode of the player represented by this data.intGets the latency between the client and the server.intgetPing()Deprecated.Gets the GameProfile of the player represented by this data.inthashCode()toString()
-
Constructor Details
-
PlayerInfoData
public PlayerInfoData(WrappedGameProfile profile, int latency, EnumWrappers.NativeGameMode gameMode, WrappedChatComponent displayName)
-
-
Method Details
-
getProfile
Gets the GameProfile of the player represented by this data.- Returns:
- The GameProfile
-
getPing
Deprecated.Replaced bygetLatency() -
getLatency
public int getLatency()Gets the latency between the client and the server.- Returns:
- The latency
-
getGameMode
Gets the GameMode of the player represented by this data.- Returns:
- The GameMode
-
getDisplayName
Gets the display name of the player represented by this data.- Returns:
- The display name
-
getConverter
Used to convert between NMS PlayerInfoData and the wrapper instance.- Returns:
- A new converter.
-
equals
-
hashCode
public int hashCode() -
toString
-
getLatency()