Record Class CommandResponseTracker.Messages<Element>
java.lang.Object
java.lang.Record
net.minecraft.server.commands.CommandResponseTracker.Messages<Element>
- Enclosing class:
CommandResponseTracker<Element>
public static record CommandResponseTracker.Messages<Element>(@Nullable CommandResponseTracker.ErrorHandler onZero, CommandResponseTracker.Dispatch<Component, Element> onSuccess)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandResponseTracker.Dispatch<Component, Element> The field for theonSuccessrecord component.private final @Nullable CommandResponseTracker.ErrorHandlerThe field for theonZerorecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMessages(@Nullable CommandResponseTracker.ErrorHandler onZero, CommandResponseTracker.Dispatch<Component, Element> onSuccess) Creates an instance of aMessagesrecord 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) 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
-
Messages
public Messages(@Nullable CommandResponseTracker.ErrorHandler onZero, CommandResponseTracker.Dispatch<Component, Element> onSuccess) Creates an instance of aMessagesrecord class.- Parameters:
onZero- the value for theonZerorecord componentonSuccess- the value for theonSuccessrecord component
-
-
Method Details
-
throwIfZero
public void throwIfZero(int value) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
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
-