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
FieldsModifier and TypeFieldDescriptionprivate final PlayerChatMessageThe field for thesignedArgumentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionChatMessage(PlayerChatMessage signedArgument) Creates an instance of aChatMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidconsume(CommandSourceStack p_241491_) final booleanIndicates whether some other object is "equal to" this one.private CompletableFuture<FilteredText>filterPlainText(CommandSourceStack p_241399_, String p_241465_) final inthashCode()Returns a hash code value for this object.voidresolve(CommandSourceStack p_242313_, Consumer<PlayerChatMessage> p_242409_) Returns the value of thesignedArgumentrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
signedArgument
The field for thesignedArgumentrecord component.
-
-
Constructor Details
-
ChatMessage
Creates an instance of aChatMessagerecord class.- Parameters:
signedArgument- the value for thesignedArgumentrecord 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 thesignedArgumentrecord component.- Returns:
- the value of the
signedArgumentrecord component
-