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
Modifier and TypeFieldDescriptionprivate final int
The field for thehttpCode
record component.private final Component
The field for thepayload
record component.static final Component
static final RealmsError.CustomError
Fields inherited from interface com.mojang.realmsclient.client.RealmsError
LOGGER, NO_MESSAGE
-
Constructor Summary
ConstructorDescriptionCustomError
(int httpCode, Component payload) Creates an instance of aCustomError
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RealmsError.CustomError
connectivityError
(RealmsHttpException p_298467_) final boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.int
httpCode()
Returns the value of thehttpCode
record component.static RealmsError.CustomError
noPayload
(int p_298598_) payload()
Returns the value of thepayload
record component.static RealmsError.CustomError
retry
(int p_297862_) final String
toString()
Returns a string representation of this record class.static RealmsError.CustomError
unknownCompatibilityResponse
(String p_300024_)
-
Field Details
-
httpCode
private final int httpCodeThe field for thehttpCode
record component. -
payload
The field for thepayload
record component. -
SERVICE_BUSY
-
RETRY_MESSAGE
-
-
Constructor Details
-
CustomError
Creates an instance of aCustomError
record class.- Parameters:
httpCode
- the value for thehttpCode
record componentpayload
- the value for thepayload
record component
-
-
Method Details
-
unknownCompatibilityResponse
-
connectivityError
-
retry
-
noPayload
-
errorCode
public int errorCode()- Specified by:
errorCode
in interfaceRealmsError
-
errorMessage
- Specified by:
errorMessage
in interfaceRealmsError
-
logMessage
- Specified by:
logMessage
in 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 thehttpCode
record component.- Returns:
- the value of the
httpCode
record component
-
payload
Returns the value of thepayload
record component.- Returns:
- the value of the
payload
record component
-