Record Class MessageArgumentType.SignedMessage

java.lang.Object
java.lang.Record
net.minecraft.command.argument.MessageArgumentType.SignedMessage
Record Components:
plain -
formatted -
signature -
signedPreview -
Enclosing class:
MessageArgumentType

public static record MessageArgumentType.SignedMessage(String plain, Text formatted, MessageSignatureData signature, boolean signedPreview) 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_856
named signature
official d
intermediary comp_857
named signedPreview
  • Field Details

    • plain

      private final String plain
      The field for the plain record component.
    • formatted

      private final Text formatted
      The field for the formatted record component.
    • signature

      private final MessageSignatureData signature
      The field for the signature record component.
    • signedPreview

      private final boolean signedPreview
      The field for the signedPreview record component.
  • Constructor Details

  • Method Details

    • decorate

      Mappings:
      Namespace Name Mixin selector
      official a Lef$a;a(Ldr;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_44262 Lnet/minecraft/class_2196$class_7515;method_44262(Lnet/minecraft/class_2168;)Ljava/util/concurrent/CompletableFuture;
      named decorate Lnet/minecraft/command/argument/MessageArgumentType$SignedMessage;decorate(Lnet/minecraft/server/command/ServerCommandSource;)Ljava/util/concurrent/CompletableFuture;
    • format

      private FilteredMessage<Text> format(ServerCommandSource source, FilteredMessage<String> message)
      Returns the formatted message.

      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;Lagl;)Lagl;
      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

      @Nullable private @Nullable Text format(ServerCommandSource source, String filteredText)
      Returns the parsed and formatted filteredText, or null if it fails.
      Returns:
      the parsed and formatted filteredText, or null if it fails
      Mappings:
      Namespace Name Mixin selector
      official a Lef$a;a(Ldr;Ljava/lang/String;)Lrm;
      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

      Mappings:
      Namespace Name Mixin selector
      official a Lef$a;a(Ldr;Lagl;Lagl;)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

      public void sendHeader(ServerCommandSource source)
      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 b Lef$a;b(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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • plain

      public String plain()
      Returns the value of the plain record component.
      Returns:
      the value of the plain record component
    • formatted

      public Text formatted()
      Returns the value of the formatted record component.
      Returns:
      the value of the formatted record component
    • signature

      public MessageSignatureData signature()
      Returns the value of the signature record component.
      Returns:
      the value of the signature record component
    • signedPreview

      public boolean signedPreview()
      Returns the value of the signedPreview record component.
      Returns:
      the value of the signedPreview record component