Record Class ReportEnvironment

java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.report.ReportEnvironment

public record ReportEnvironment(String clientVersion, @Nullable ReportEnvironment.Server server) extends Record
  • Field Details

    • clientVersion

      private final String clientVersion
      The field for the clientVersion record component.
    • server

      @Nullable private final ReportEnvironment.Server server
      The field for the server record component.
  • Constructor Details

    • ReportEnvironment

      public ReportEnvironment(String clientVersion, @Nullable ReportEnvironment.Server server)
      Creates an instance of a ReportEnvironment record class.
      Parameters:
      clientVersion - the value for the clientVersion record component
      server - the value for the server record component
  • Method Details

    • local

      public static ReportEnvironment local()
    • thirdParty

      public static ReportEnvironment thirdParty(String p_238999_)
    • realm

      public static ReportEnvironment realm(RealmsServer p_239765_)
    • create

      public static ReportEnvironment create(@Nullable ReportEnvironment.Server p_239956_)
    • clientInfo

      public com.mojang.authlib.yggdrasil.request.AbuseReportRequest.ClientInfo clientInfo()
    • thirdPartyServerInfo

      @Nullable public com.mojang.authlib.yggdrasil.request.AbuseReportRequest.ThirdPartyServerInfo thirdPartyServerInfo()
    • realmInfo

      @Nullable public com.mojang.authlib.yggdrasil.request.AbuseReportRequest.RealmInfo realmInfo()
    • getClientVersion

      private static String getClientVersion()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • clientVersion

      public String clientVersion()
      Returns the value of the clientVersion record component.
      Returns:
      the value of the clientVersion record component
    • server

      @Nullable public ReportEnvironment.Server server()
      Returns the value of the server record component.
      Returns:
      the value of the server record component