Package net.minecraft.commands.arguments
Record Class MessageArgument.ChatMessage
java.lang.Object
java.lang.Record
net.minecraft.commands.arguments.MessageArgument.ChatMessage
- Enclosing class:
- MessageArgument
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PlayerChatMessage
The field for thesignedArgument
record component. -
Constructor Summary
ConstructorDescriptionChatMessage
(PlayerChatMessage signedArgument) Creates an instance of aChatMessage
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consume
(CommandSourceStack p_241491_) final boolean
Indicates whether some other object is "equal to" this one.private CompletableFuture<FilteredText>
filterPlainText
(CommandSourceStack p_241399_, String p_241465_) final int
hashCode()
Returns a hash code value for this object.void
resolve
(CommandSourceStack p_242313_, Consumer<PlayerChatMessage> p_242409_) Returns the value of thesignedArgument
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
signedArgument
The field for thesignedArgument
record component.
-
-
Constructor Details
-
ChatMessage
Creates an instance of aChatMessage
record class.- Parameters:
signedArgument
- the value for thesignedArgument
record component
-
-
Method Details
-
resolve
-
filterPlainText
private CompletableFuture<FilteredText> filterPlainText(CommandSourceStack p_241399_, String p_241465_) -
consume
-
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)
. -
signedArgument
Returns the value of thesignedArgument
record component.- Returns:
- the value of the
signedArgument
record component
-