Record Class IncomingRpcMethod.ParameterlessMethod<Params,Result>
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.IncomingRpcMethod.ParameterlessMethod<Params,Result>
- All Implemented Interfaces:
IncomingRpcMethod<Params,Result>
- Enclosing interface:
IncomingRpcMethod<Params,Result>
public static record IncomingRpcMethod.ParameterlessMethod<Params,Result> (MethodInfo<Params,Result> info, IncomingRpcMethod.Attributes attributes, IncomingRpcMethod.ParameterlessRpcMethodFunction<Result> supplier)
extends Record
implements IncomingRpcMethod<Params,Result>
-
Nested Class Summary
Nested classes/interfaces inherited from interface IncomingRpcMethod
IncomingRpcMethod.Attributes, IncomingRpcMethod.IncomingRpcMethodBuilder<Params,Result>, IncomingRpcMethod.Method<Params, Result>, IncomingRpcMethod.ParameterlessMethod<Params, Result>, IncomingRpcMethod.ParameterlessRpcMethodFunction<Result>, IncomingRpcMethod.RpcMethodFunction<Params, Result> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IncomingRpcMethod.AttributesThe field for theattributesrecord component.private final MethodInfo<Params, Result> The field for theinforecord component.private final IncomingRpcMethod.ParameterlessRpcMethodFunction<Result> The field for thesupplierrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParameterlessMethod(MethodInfo<Params, Result> info, IncomingRpcMethod.Attributes attributes, IncomingRpcMethod.ParameterlessRpcMethodFunction<Result> supplier) Creates an instance of aParameterlessMethodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(MinecraftApi minecraftApi, @Nullable JsonElement paramsJson, ClientInfo clientInfo) Returns the value of theattributesrecord component.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.supplier()Returns the value of thesupplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
info
The field for theinforecord component. -
attributes
The field for theattributesrecord component. -
supplier
The field for thesupplierrecord component.
-
-
Constructor Details
-
ParameterlessMethod
public ParameterlessMethod(MethodInfo<Params, Result> info, IncomingRpcMethod.Attributes attributes, IncomingRpcMethod.ParameterlessRpcMethodFunction<Result> supplier) Creates an instance of aParameterlessMethodrecord class.- Parameters:
info- the value for theinforecord componentattributes- the value for theattributesrecord componentsupplier- the value for thesupplierrecord component
-
-
Method Details
-
apply
public JsonElement apply(MinecraftApi minecraftApi, @Nullable JsonElement paramsJson, ClientInfo clientInfo) - Specified by:
applyin interfaceIncomingRpcMethod<Params,Result>
-
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 interfaceIncomingRpcMethod<Params,Result> - Returns:
- the value of the
inforecord component
-
attributes
Returns the value of theattributesrecord component.- Specified by:
attributesin interfaceIncomingRpcMethod<Params,Result> - Returns:
- the value of the
attributesrecord component
-
supplier
Returns the value of thesupplierrecord component.- Returns:
- the value of the
supplierrecord component
-