Record Class CommandResponseTracker.MessagesWithArgs<Element,Arg0,Arg1>
java.lang.Object
java.lang.Record
net.minecraft.server.commands.CommandResponseTracker.MessagesWithArgs<Element,Arg0,Arg1>
- Enclosing class:
CommandResponseTracker<Element>
public static record CommandResponseTracker.MessagesWithArgs<Element,Arg0,Arg1> (@Nullable CommandResponseTracker.ErrorHandlerWithArgs<Arg0,Arg1> onZero, CommandResponseTracker.DispatchWithArgs<Component, Element, Arg0, Arg1> onSuccess)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandResponseTracker.DispatchWithArgs<Component, Element, Arg0, Arg1> The field for theonSuccessrecord component.private final @Nullable CommandResponseTracker.ErrorHandlerWithArgs<Arg0, Arg1> The field for theonZerorecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMessagesWithArgs(@Nullable CommandResponseTracker.ErrorHandlerWithArgs<Arg0, Arg1> onZero, CommandResponseTracker.DispatchWithArgs<Component, Element, Arg0, Arg1> onSuccess) Creates an instance of aMessagesWithArgsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theonSuccessrecord component.onZero()Returns the value of theonZerorecord component.voidthrowIfZero(int value, Arg0 argument0, Arg1 argument1) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
onZero
The field for theonZerorecord component. -
onSuccess
The field for theonSuccessrecord component.
-
-
Constructor Details
-
MessagesWithArgs
public MessagesWithArgs(@Nullable CommandResponseTracker.ErrorHandlerWithArgs<Arg0, Arg1> onZero, CommandResponseTracker.DispatchWithArgs<Component, Element, Arg0, Arg1> onSuccess) Creates an instance of aMessagesWithArgsrecord class.- Parameters:
onZero- the value for theonZerorecord componentonSuccess- the value for theonSuccessrecord component
-
-
Method Details
-
throwIfZero
-
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). -
onZero
Returns the value of theonZerorecord component.- Returns:
- the value of the
onZerorecord component
-
onSuccess
Returns the value of theonSuccessrecord component.- Returns:
- the value of the
onSuccessrecord component
-