Record Class AbuseReportSender.Services
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.report.AbuseReportSender.Services
- All Implemented Interfaces:
AbuseReportSender
- Enclosing interface:
AbuseReportSender
public static record AbuseReportSender.Services(ReportEnvironment environment, com.mojang.authlib.minecraft.UserApiService userApiService)
extends Record
implements AbuseReportSender
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.multiplayer.chat.report.AbuseReportSender
AbuseReportSender.SendException, AbuseReportSender.Services -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReportEnvironmentThe field for theenvironmentrecord component.private static final Componentprivate static final Componentprivate static final Componentprivate final com.mojang.authlib.minecraft.UserApiServiceThe field for theuserApiServicerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionServices(ReportEnvironment environment, com.mojang.authlib.minecraft.UserApiService userApiService) Creates an instance of aServicesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.private ComponentgetErrorDescription(com.mojang.authlib.exceptions.MinecraftClientException p_240068_) private ComponentgetHttpErrorDescription(com.mojang.authlib.exceptions.MinecraftClientHttpException p_239705_) final inthashCode()Returns a hash code value for this object.booleancom.mojang.authlib.minecraft.report.AbuseReportLimitsCompletableFuture<com.mojang.datafixers.util.Unit> send(UUID p_239470_, ReportType p_299858_, com.mojang.authlib.minecraft.report.AbuseReport p_239471_) final StringtoString()Returns a string representation of this record class.com.mojang.authlib.minecraft.UserApiServiceReturns the value of theuserApiServicerecord component.
-
Field Details
-
environment
The field for theenvironmentrecord component. -
userApiService
private final com.mojang.authlib.minecraft.UserApiService userApiServiceThe field for theuserApiServicerecord component. -
SERVICE_UNAVAILABLE_TEXT
-
HTTP_ERROR_TEXT
-
JSON_ERROR_TEXT
-
-
Constructor Details
-
Services
public Services(ReportEnvironment environment, com.mojang.authlib.minecraft.UserApiService userApiService) Creates an instance of aServicesrecord class.- Parameters:
environment- the value for theenvironmentrecord componentuserApiService- the value for theuserApiServicerecord component
-
-
Method Details
-
send
public CompletableFuture<com.mojang.datafixers.util.Unit> send(UUID p_239470_, ReportType p_299858_, com.mojang.authlib.minecraft.report.AbuseReport p_239471_) - Specified by:
sendin interfaceAbuseReportSender
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceAbuseReportSender
-
getHttpErrorDescription
private Component getHttpErrorDescription(com.mojang.authlib.exceptions.MinecraftClientHttpException p_239705_) -
getErrorDescription
private Component getErrorDescription(com.mojang.authlib.exceptions.MinecraftClientException p_240068_) -
reportLimits
public com.mojang.authlib.minecraft.report.AbuseReportLimits reportLimits()- Specified by:
reportLimitsin interfaceAbuseReportSender
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
userApiService
public com.mojang.authlib.minecraft.UserApiService userApiService()Returns the value of theuserApiServicerecord component.- Returns:
- the value of the
userApiServicerecord component
-