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)
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, @Nullable ChatSession chatSession) extends Record
플레이어 데이터
  • Constructor Details

    • PlayerData

      public PlayerData(UUID profileId, @Nullable com.mojang.authlib.GameProfile profile, boolean listed, int latency, @Nullable GameMode gameMode, @Nullable Component playerListName, @Nullable ChatSession chatSession)
      Creates an instance of a PlayerData record class.
      Parameters:
      profileId - the value for the profileId record component
      profile - the value for the profile record component
      listed - the value for the listed record component
      latency - the value for the latency record component
      gameMode - the value for the gameMode record component
      playerListName - the value for the playerListName record component
      chatSession - the value for the chatSession record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • profileId

      public UUID profileId()
      Returns the value of the profileId record component.
      Returns:
      the value of the profileId record component
    • profile

      public @Nullable com.mojang.authlib.GameProfile profile()
      Returns the value of the profile record component.
      Returns:
      the value of the profile record component
    • listed

      public boolean listed()
      Returns the value of the listed record component.
      Returns:
      the value of the listed record component
    • latency

      public int latency()
      Returns the value of the latency record component.
      Returns:
      the value of the latency record component
    • gameMode

      public @Nullable GameMode gameMode()
      Returns the value of the gameMode record component.
      Returns:
      the value of the gameMode record component
    • playerListName

      public @Nullable Component playerListName()
      Returns the value of the playerListName record component.
      Returns:
      the value of the playerListName record component
    • chatSession

      public @Nullable ChatSession chatSession()
      Returns the value of the chatSession record component.
      Returns:
      the value of the chatSession record component