Package moe.caramel.daydream.packet
Record Class PlayerInfoUpdatePacket.PlayerData
java.lang.Object
java.lang.Record
moe.caramel.daydream.packet.PlayerInfoUpdatePacket.PlayerData
- Record Components:
profileId- 플레이어의 게임 프로파일 UUID (필수: 모두)profile- 플레이어의 게임 프로파일 (필수:PlayerInfoUpdatePacket.Action.ADD_PLAYER)listed- 탭 리스트 표시 여부 (필수:PlayerInfoUpdatePacket.Action.UPDATE_LISTED)latency- 플레이어의 지연 시간 (필수:PlayerInfoUpdatePacket.Action.UPDATE_LATENCY)gameMode- 플레이어의 게임 모드 (필수:PlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE)playerListName- 플레이어의 표시 이름 (필수:PlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME)showHat- 플레이어 스킨의 모자 레이어 표시 여부 (필수:PlayerInfoUpdatePacket.Action.UPDATE_HAT)listOrder- 플레이어 탭 리스트 순서 (필수:PlayerInfoUpdatePacket.Action.UPDATE_LIST_ORDER)chatSession- 플레이어의 채팅 세션 (선택:PlayerInfoUpdatePacket.Action.INITIALIZE_CHAT)
- Enclosing interface:
PlayerInfoUpdatePacket
public static record PlayerInfoUpdatePacket.PlayerData(UUID profileId, @Nullable com.mojang.authlib.GameProfile profile, boolean listed, int latency, @Nullable GameMode gameMode, @Nullable Component playerListName, boolean showHat, int listOrder, @Nullable ChatSession chatSession)
extends Record
플레이어 데이터
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerData(UUID profileId, @Nullable com.mojang.authlib.GameProfile profile, boolean listed, int latency, @Nullable GameMode gameMode, @Nullable Component playerListName, boolean showHat, int listOrder, @Nullable ChatSession chatSession) Creates an instance of aPlayerDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechatSessionrecord component.final booleanIndicates whether some other object is "equal to" this one.gameMode()Returns the value of thegameModerecord component.final inthashCode()Returns a hash code value for this object.intlatency()Returns the value of thelatencyrecord component.booleanlisted()Returns the value of thelistedrecord component.intReturns the value of thelistOrderrecord component.Returns the value of theplayerListNamerecord component.@Nullable com.mojang.authlib.GameProfileprofile()Returns the value of theprofilerecord component.Returns the value of theprofileIdrecord component.booleanshowHat()Returns the value of theshowHatrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerData
public PlayerData(UUID profileId, @Nullable com.mojang.authlib.GameProfile profile, boolean listed, int latency, @Nullable GameMode gameMode, @Nullable Component playerListName, boolean showHat, int listOrder, @Nullable ChatSession chatSession) Creates an instance of aPlayerDatarecord class.- Parameters:
profileId- the value for theprofileIdrecord componentprofile- the value for theprofilerecord componentlisted- the value for thelistedrecord componentlatency- the value for thelatencyrecord componentgameMode- the value for thegameModerecord componentplayerListName- the value for theplayerListNamerecord componentshowHat- the value for theshowHatrecord componentlistOrder- the value for thelistOrderrecord componentchatSession- the value for thechatSessionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
profileId
Returns the value of theprofileIdrecord component.- Returns:
- the value of the
profileIdrecord component
-
profile
Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-
listed
public boolean listed()Returns the value of thelistedrecord component.- Returns:
- the value of the
listedrecord component
-
latency
public int latency()Returns the value of thelatencyrecord component.- Returns:
- the value of the
latencyrecord component
-
gameMode
Returns the value of thegameModerecord component.- Returns:
- the value of the
gameModerecord component
-
playerListName
Returns the value of theplayerListNamerecord component.- Returns:
- the value of the
playerListNamerecord component
-
showHat
public boolean showHat()Returns the value of theshowHatrecord component.- Returns:
- the value of the
showHatrecord component
-
listOrder
public int listOrder()Returns the value of thelistOrderrecord component.- Returns:
- the value of the
listOrderrecord component
-
chatSession
Returns the value of thechatSessionrecord component.- Returns:
- the value of the
chatSessionrecord component
-