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 Summary
Nested classes/interfaces inherited from interface com.mojang.realmsclient.client.RealmsError
RealmsError.AuthenticationError, RealmsError.CustomError, RealmsError.ErrorWithJsonPayload, RealmsError.ErrorWithRawPayload -
Field Summary
FieldsModifier 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.RealmsError
LOGGER, NO_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionCustomError(int httpCode, Component payload) Creates an instance of aCustomErrorrecord class. -
Method Summary
Modifier 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
-
httpCode
private final int httpCodeThe field for thehttpCoderecord component. -
payload
The field for thepayloadrecord component. -
SERVICE_BUSY
-
RETRY_MESSAGE
-
-
Constructor Details
-
CustomError
Creates an instance of aCustomErrorrecord class.- Parameters:
httpCode- the value for thehttpCoderecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
unknownCompatibilityResponse
-
connectivityError
-
retry
-
noPayload
-
errorCode
public int errorCode()- Specified by:
errorCodein interfaceRealmsError
-
errorMessage
- Specified by:
errorMessagein interfaceRealmsError
-
logMessage
- Specified by:
logMessagein interfaceRealmsError
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
httpCode
public int httpCode()Returns the value of thehttpCoderecord component.- Returns:
- the value of the
httpCoderecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-