Record Class SentMessage.Chat

java.lang.Object
java.lang.Record
net.minecraft.network.message.SentMessage.Chat
Record Components:
message -
All Implemented Interfaces:
SentMessage
Enclosing interface:
SentMessage

public static record SentMessage.Chat(SignedMessage message) extends Record implements SentMessage
The wrapper used for normal chat messages.

Text filtering can cause some players to not receive this kind of message.

Mappings:
Namespace Name
official tx$b
intermediary net/minecraft/class_7604$class_7607
named net/minecraft/network/message/SentMessage$Chat
official a
intermediary comp_1082
named message
  • Field Details

  • Constructor Details

    • Chat

      public Chat(SignedMessage message)
      Creates an instance of a Chat record class.
      Parameters:
      message - the value for the message record component
  • Method Details

    • getContent

      public Text getContent()
      Specified by:
      getContent in interface SentMessage
      Mappings:
      Namespace Name Mixin selector
      official a Ltx;a()Ltj;
      intermediary comp_1081 Lnet/minecraft/class_7604;comp_1081()Lnet/minecraft/class_2561;
      named getContent Lnet/minecraft/network/message/SentMessage;getContent()Lnet/minecraft/text/Text;
    • send

      public void send(ServerPlayerEntity sender, boolean filterMaskEnabled, MessageType.Parameters params)
      Specified by:
      send in interface SentMessage
      Mappings:
      Namespace Name Mixin selector
      official a Ltx;a(Laiq;ZLtf$a;)V
      intermediary method_45095 Lnet/minecraft/class_7604;method_45095(Lnet/minecraft/class_3222;ZLnet/minecraft/class_2556$class_7602;)V
      named send Lnet/minecraft/network/message/SentMessage;send(Lnet/minecraft/server/network/ServerPlayerEntity;ZLnet/minecraft/network/message/MessageType$Parameters;)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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • message

      public SignedMessage message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component