Package com.mojang.realmsclient.client
Record Class RealmsError.CustomError
java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.CustomError
- All Implemented Interfaces:
- RealmsError
- Enclosing interface:
- RealmsError
public static record RealmsError.CustomError(int httpCode, @Nullable Component payload)
extends Record
implements RealmsError
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.mojang.realmsclient.client.RealmsErrorRealmsError.AuthenticationError, RealmsError.CustomError, RealmsError.ErrorWithJsonPayload, RealmsError.ErrorWithRawPayload
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thehttpCoderecord component.private final ComponentThe field for thepayloadrecord component.static final Componentstatic final RealmsError.CustomErrorFields inherited from interface com.mojang.realmsclient.client.RealmsErrorLOGGER, NO_MESSAGE
- 
Constructor SummaryConstructorsConstructorDescriptionCustomError(int httpCode, Component payload) Creates an instance of aCustomErrorrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic RealmsError.CustomErrorconnectivityError(RealmsHttpException p_294863_) final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.inthttpCode()Returns the value of thehttpCoderecord component.static RealmsError.CustomErrornoPayload(int p_295243_) payload()Returns the value of thepayloadrecord component.static RealmsError.CustomErrorretry(int p_295020_) final StringtoString()Returns a string representation of this record class.static RealmsError.CustomErrorunknownCompatibilityResponse(String p_294662_) 
- 
Field Details- 
httpCodeprivate final int httpCodeThe field for thehttpCoderecord component.
- 
payloadThe field for thepayloadrecord component.
- 
SERVICE_BUSY
- 
RETRY_MESSAGE
 
- 
- 
Constructor Details- 
CustomErrorCreates an instance of aCustomErrorrecord class.- Parameters:
- httpCode- the value for the- httpCoderecord component
- payload- the value for the- payloadrecord component
 
 
- 
- 
Method Details- 
unknownCompatibilityResponse
- 
connectivityError
- 
retry
- 
noPayload
- 
errorCodepublic int errorCode()- Specified by:
- errorCodein interface- RealmsError
 
- 
errorMessage- Specified by:
- errorMessagein interface- RealmsError
 
- 
logMessage- Specified by:
- logMessagein interface- RealmsError
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
httpCodepublic int httpCode()Returns the value of thehttpCoderecord component.- Returns:
- the value of the httpCoderecord component
 
- 
payloadReturns the value of thepayloadrecord component.- Returns:
- the value of the payloadrecord component
 
 
-