Record Class OutgoingRpcMethod.Notification<Params>
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.OutgoingRpcMethod.Notification<Params>
- All Implemented Interfaces:
OutgoingRpcMethod<Params,Void>
- Enclosing interface:
OutgoingRpcMethod<Params,Result>
public static record OutgoingRpcMethod.Notification<Params>(MethodInfo<Params,Void> info, OutgoingRpcMethod.Attributes attributes)
extends Record
implements OutgoingRpcMethod<Params,Void>
-
Nested Class Summary
Nested classes/interfaces inherited from interface OutgoingRpcMethod
OutgoingRpcMethod.Attributes, OutgoingRpcMethod.Factory<Params,Result>, OutgoingRpcMethod.Method<Params, Result>, OutgoingRpcMethod.Notification<Params>, OutgoingRpcMethod.OutgoingRpcMethodBuilder<Params, Result>, OutgoingRpcMethod.ParameterlessMethod<Result>, OutgoingRpcMethod.ParmeterlessNotification -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OutgoingRpcMethod.AttributesThe field for theattributesrecord component.private final MethodInfo<Params, Void> The field for theinforecord component.Fields inherited from interface OutgoingRpcMethod
NOTIFICATION_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionNotification(MethodInfo<Params, Void> info, OutgoingRpcMethod.Attributes attributes) Creates an instance of aNotificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.@Nullable JsonElementencodeParams(Params params) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface OutgoingRpcMethod
decodeResult
-
Field Details
-
info
The field for theinforecord component. -
attributes
The field for theattributesrecord component.
-
-
Constructor Details
-
Notification
Creates an instance of aNotificationrecord class.- Parameters:
info- the value for theinforecord componentattributes- the value for theattributesrecord component
-
-
Method Details
-
encodeParams
- Specified by:
encodeParamsin interfaceOutgoingRpcMethod<Params,Void>
-
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). -
info
Returns the value of theinforecord component.- Specified by:
infoin interfaceOutgoingRpcMethod<Params,Void> - Returns:
- the value of the
inforecord component
-
attributes
Returns the value of theattributesrecord component.- Specified by:
attributesin interfaceOutgoingRpcMethod<Params,Void> - Returns:
- the value of the
attributesrecord component
-