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 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 e) private ComponentgetHttpErrorDescription(com.mojang.authlib.exceptions.MinecraftClientHttpException e) final inthashCode()Returns a hash code value for this object.booleancom.mojang.authlib.minecraft.report.AbuseReportLimitsCompletableFuture<com.mojang.datafixers.util.Unit> send(UUID id, ReportType reportType, com.mojang.authlib.minecraft.report.AbuseReport report) 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 id, ReportType reportType, com.mojang.authlib.minecraft.report.AbuseReport report) - Specified by:
sendin interfaceAbuseReportSender
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceAbuseReportSender
-
getHttpErrorDescription
private Component getHttpErrorDescription(com.mojang.authlib.exceptions.MinecraftClientHttpException e) -
getErrorDescription
-
reportLimits
public com.mojang.authlib.minecraft.report.AbuseReportLimits reportLimits()- Specified by:
reportLimitsin interfaceAbuseReportSender
-
toString
-
hashCode
-
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
-