Record Class PlayerInfoEntry

java.lang.Object
java.lang.Record
devs.beer.nativepackets.api.PlayerInfoEntry

public record PlayerInfoEntry(UUID profileId, NativeGameProfile profile, boolean listed, int latency, NativeGameMode gameMode, NativeText displayName, boolean showHat, int listOrder, NativeValue chatSession) extends Record
Complete portable state for one player-info update entry.
  • Constructor Details

    • PlayerInfoEntry

      public PlayerInfoEntry(UUID profileId, @Nullable NativeGameProfile profile, boolean listed, int latency, NativeGameMode gameMode, @Nullable NativeText displayName, boolean showHat, int listOrder, @Nullable NativeValue chatSession)
      Creates an instance of a PlayerInfoEntry 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
      displayName - the value for the displayName record component
      showHat - the value for the showHat record component
      listOrder - the value for the listOrder 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

      @Nullable public NativeGameProfile 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 NativeGameMode gameMode()
      Returns the value of the gameMode record component.
      Returns:
      the value of the gameMode record component
    • displayName

      @Nullable public NativeText displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • showHat

      public boolean showHat()
      Returns the value of the showHat record component.
      Returns:
      the value of the showHat record component
    • listOrder

      public int listOrder()
      Returns the value of the listOrder record component.
      Returns:
      the value of the listOrder record component
    • chatSession

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