Package net.minecraft.network.chat
Record Class PreviewableCommand<S>
java.lang.Object
java.lang.Record
net.minecraft.network.chat.PreviewableCommand<S>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<PreviewableCommand.Argument<S>>
The field for thearguments
record component. -
Constructor Summary
ConstructorDescriptionPreviewableCommand
(List<PreviewableCommand.Argument<S>> arguments) Creates an instance of aPreviewableCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thearguments
record component.private static <S> List<PreviewableCommand.Argument<S>>
collectArguments
(com.mojang.brigadier.context.CommandContextBuilder<S> p_242893_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isPreviewed
(com.mojang.brigadier.tree.CommandNode<?> p_242917_) static <S> PreviewableCommand<S>
of
(com.mojang.brigadier.ParseResults<S> p_242945_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
arguments
The field for thearguments
record component.
-
-
Constructor Details
-
PreviewableCommand
Creates an instance of aPreviewableCommand
record class.- Parameters:
arguments
- the value for thearguments
record component
-
-
Method Details
-
of
-
collectArguments
private static <S> List<PreviewableCommand.Argument<S>> collectArguments(com.mojang.brigadier.context.CommandContextBuilder<S> p_242893_) -
isPreviewed
public boolean isPreviewed(com.mojang.brigadier.tree.CommandNode<?> p_242917_) -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
arguments
Returns the value of thearguments
record component.- Returns:
- the value of the
arguments
record component
-