Package net.minecraft.command.argument
Record Class MessageArgumentType.SignedMessage
java.lang.Object
java.lang.Record
net.minecraft.command.argument.MessageArgumentType.SignedMessage
- Record Components:
plain
-formatted
-signedArgument
-
- Enclosing class:
MessageArgumentType
public static record MessageArgumentType.SignedMessage(String plain, Text formatted, SignedCommandArguments.class_7622 signedArgument)
extends Record
- Mappings:
Namespace Name official ef$a
intermediary net/minecraft/class_2196$class_7515
named net/minecraft/command/argument/MessageArgumentType$SignedMessage
official a
intermediary comp_855
named plain
official b
intermediary comp_861
named formatted
official c
intermediary comp_954
named signedArgument
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Text
The field for theformatted
record component.private final String
The field for theplain
record component.private final SignedCommandArguments.class_7622
The field for thesignedArgument
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSignedMessage
(String string, Text text, SignedCommandArguments.class_7622 class_7622) -
Method Summary
Modifier and TypeMethodDescriptionvoid
decorate
(ServerCommandSource serverCommandSource, Consumer<FilteredMessage<SignedMessage>> consumer) private CompletableFuture<FilteredMessage<SignedMessage>>
decorate
(ServerCommandSource source, FilteredMessage<String> filtered, FilteredMessage<Text> formatted) final boolean
Indicates whether some other object is "equal to" this one.private CompletableFuture<FilteredMessage<String>>
filterText
(ServerCommandSource source, String text) format
(ServerCommandSource source, String filteredText) Returns the parsed and formattedfilteredText
, ornull
if it fails.private FilteredMessage<Text>
format
(ServerCommandSource source, FilteredMessage<String> message) Returns the formattedmessage
.Returns the value of theformatted
record component.final int
hashCode()
Returns a hash code value for this object.plain()
Returns the value of theplain
record component.void
sendHeader
(ServerCommandSource source) Sends the message's header to all players.Returns the value of thesignedArgument
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
plain
The field for theplain
record component. -
formatted
The field for theformatted
record component. -
signedArgument
The field for thesignedArgument
record component.
-
-
Constructor Details
-
SignedMessage
-
-
Method Details
-
decorate
public void decorate(ServerCommandSource serverCommandSource, Consumer<FilteredMessage<SignedMessage>> consumer) - Mappings:
Namespace Name Mixin selector official a
Lef$a;a(Ldr;Ljava/util/function/Consumer;)V
intermediary method_44262
Lnet/minecraft/class_2196$class_7515;method_44262(Lnet/minecraft/class_2168;Ljava/util/function/Consumer;)V
named decorate
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;decorate(Lnet/minecraft/server/command/ServerCommandSource;Ljava/util/function/Consumer;)V
-
format
Returns the formattedmessage
.If the message contains a filtered part, that part is formatted by
format(ServerCommandSource, String)
.- Returns:
- the formatted
message
- Mappings:
Namespace Name Mixin selector official a
Lef$a;a(Ldr;Lagr;)Lagr;
intermediary method_44802
Lnet/minecraft/class_2196$class_7515;method_44802(Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;)Lnet/minecraft/class_5837;
named format
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;format(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/server/filter/FilteredMessage;)Lnet/minecraft/server/filter/FilteredMessage;
-
format
Returns the parsed and formattedfilteredText
, ornull
if it fails.- Returns:
- the parsed and formatted
filteredText
, ornull
if it fails - Mappings:
Namespace Name Mixin selector official a
Lef$a;a(Ldr;Ljava/lang/String;)Lro;
intermediary method_44804
Lnet/minecraft/class_2196$class_7515;method_44804(Lnet/minecraft/class_2168;Ljava/lang/String;)Lnet/minecraft/class_2561;
named format
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;format(Lnet/minecraft/server/command/ServerCommandSource;Ljava/lang/String;)Lnet/minecraft/text/Text;
-
decorate
private CompletableFuture<FilteredMessage<SignedMessage>> decorate(ServerCommandSource source, FilteredMessage<String> filtered, FilteredMessage<Text> formatted) - Mappings:
Namespace Name Mixin selector official a
Lef$a;a(Ldr;Lagr;Lagr;)Ljava/util/concurrent/CompletableFuture;
intermediary method_44803
Lnet/minecraft/class_2196$class_7515;method_44803(Lnet/minecraft/class_2168;Lnet/minecraft/class_5837;Lnet/minecraft/class_5837;)Ljava/util/concurrent/CompletableFuture;
named decorate
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;decorate(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/server/filter/FilteredMessage;Lnet/minecraft/server/filter/FilteredMessage;)Ljava/util/concurrent/CompletableFuture;
-
filterText
private CompletableFuture<FilteredMessage<String>> filterText(ServerCommandSource source, String text) - Mappings:
Namespace Name Mixin selector official b
Lef$a;b(Ldr;Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
intermediary method_44808
Lnet/minecraft/class_2196$class_7515;method_44808(Lnet/minecraft/class_2168;Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
named filterText
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;filterText(Lnet/minecraft/server/command/ServerCommandSource;Ljava/lang/String;)Ljava/util/concurrent/CompletableFuture;
-
sendHeader
Sends the message's header to all players.This should be called if the message could not be sent due to an exception. See
MessageCommand
for an example.- Mappings:
Namespace Name Mixin selector official a
Lef$a;a(Ldr;)V
intermediary method_44806
Lnet/minecraft/class_2196$class_7515;method_44806(Lnet/minecraft/class_2168;)V
named sendHeader
Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;sendHeader(Lnet/minecraft/server/command/ServerCommandSource;)V
-
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)
. -
plain
Returns the value of theplain
record component.- Returns:
- the value of the
plain
record component
-
formatted
Returns the value of theformatted
record component.- Returns:
- the value of the
formatted
record component
-
signedArgument
Returns the value of thesignedArgument
record component.- Returns:
- the value of the
signedArgument
record component
-