Package net.minecraft.client.report
Record Class ReceivedMessage.ChatMessage
java.lang.Object
java.lang.Record
net.minecraft.client.report.ReceivedMessage.ChatMessage
- Record Components:
profile-displayName-message-trustLevel-
- All Implemented Interfaces:
ReceivedMessage
- Enclosing interface:
ReceivedMessage
@Environment(CLIENT)
public static record ReceivedMessage.ChatMessage(com.mojang.authlib.GameProfile profile, Text displayName, SignedMessage message, class_7595 trustLevel)
extends Record
implements ReceivedMessage
A chat message received by the client.
- Mappings:
Namespace Name official eul$aintermediary net/minecraft/class_7557$class_7558named net/minecraft/client/report/ReceivedMessage$ChatMessageofficial aintermediary comp_868named profileofficial bintermediary comp_869named displayNameofficial cintermediary comp_870named messageofficial dintermediary comp_905named trustLevel
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.report.ReceivedMessage
ReceivedMessage.ChatMessage, ReceivedMessage.GameMessage, ReceivedMessage.IndexedMessage -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DateTimeFormatterprivate final TextThe field for thedisplayNamerecord component.private final SignedMessageThe field for themessagerecord component.private final com.mojang.authlib.GameProfileThe field for theprofilerecord component.private final class_7595The field for thetrustLevelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionChatMessage(com.mojang.authlib.GameProfile gameProfile, Text text, SignedMessage signedMessage, class_7595 class_7595) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the content of the message.private TextReturns the formatted timestamp text of this message.Returns the heading text used by Chat Selection screen.Returns the narration of the message (by default, the content).Returns the UUID of the sender.final inthashCode()Returns a hash code value for this object.booleanisSentFrom(UUID uuid) Returns whether the sender's UUID equalsuuid.message()Returns the value of themessagerecord component.com.mojang.authlib.GameProfileprofile()Returns the value of theprofilerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrustLevelrecord component.
-
Field Details
-
profile
private final com.mojang.authlib.GameProfile profileThe field for theprofilerecord component. -
displayName
The field for thedisplayNamerecord component. -
message
The field for themessagerecord component. -
trustLevel
The field for thetrustLevelrecord component. -
DATE_TIME_FORMATTER
- Mappings:
Namespace Name Mixin selector official eLeul$a;e:Ljava/time/format/DateTimeFormatter;intermediary field_39637Lnet/minecraft/class_7557$class_7558;field_39637:Ljava/time/format/DateTimeFormatter;named DATE_TIME_FORMATTERLnet/minecraft/client/report/ReceivedMessage$ChatMessage;DATE_TIME_FORMATTER:Ljava/time/format/DateTimeFormatter;
-
-
Constructor Details
-
ChatMessage
public ChatMessage(com.mojang.authlib.GameProfile gameProfile, Text text, SignedMessage signedMessage, class_7595 class_7595)
-
-
Method Details
-
getContent
Returns the content of the message.- Specified by:
getContentin interfaceReceivedMessage- Returns:
- the content of the message
- Mappings:
Namespace Name Mixin selector official aLeul;a()Lrm;intermediary method_44551Lnet/minecraft/class_7557;method_44551()Lnet/minecraft/class_2561;named getContentLnet/minecraft/client/report/ReceivedMessage;getContent()Lnet/minecraft/text/Text;
-
getNarration
Returns the narration of the message (by default, the content).- Specified by:
getNarrationin interfaceReceivedMessage- Returns:
- the narration of the message (by default, the content)
- Mappings:
Namespace Name Mixin selector official bLeul;b()Lrm;intermediary method_44555Lnet/minecraft/class_7557;method_44555()Lnet/minecraft/class_2561;named getNarrationLnet/minecraft/client/report/ReceivedMessage;getNarration()Lnet/minecraft/text/Text;
-
getHeadingText
Returns the heading text used by Chat Selection screen.The text contains the sender's display name and the formatted timestamp.
- Returns:
- the heading text used by Chat Selection screen
- Mappings:
Namespace Name Mixin selector official cLeul$a;c()Lrm;intermediary method_44556Lnet/minecraft/class_7557$class_7558;method_44556()Lnet/minecraft/class_2561;named getHeadingTextLnet/minecraft/client/report/ReceivedMessage$ChatMessage;getHeadingText()Lnet/minecraft/text/Text;
-
getFormattedTimestamp
Returns the formatted timestamp text of this message.- Returns:
- the formatted timestamp text of this message
- Mappings:
Namespace Name Mixin selector official iLeul$a;i()Lrm;intermediary method_44558Lnet/minecraft/class_7557$class_7558;method_44558()Lnet/minecraft/class_2561;named getFormattedTimestampLnet/minecraft/client/report/ReceivedMessage$ChatMessage;getFormattedTimestamp()Lnet/minecraft/text/Text;
-
isSentFrom
Returns whether the sender's UUID equalsuuid.- Specified by:
isSentFromin interfaceReceivedMessage- Returns:
- whether the sender's UUID equals
uuid - Mappings:
Namespace Name Mixin selector official aLeul;a(Ljava/util/UUID;)Zintermediary method_44553Lnet/minecraft/class_7557;method_44553(Ljava/util/UUID;)Znamed isSentFromLnet/minecraft/client/report/ReceivedMessage;isSentFrom(Ljava/util/UUID;)Z
-
getSenderUuid
Returns the UUID of the sender.- Returns:
- the UUID of the sender
- Mappings:
Namespace Name Mixin selector official dLeul$a;d()Ljava/util/UUID;intermediary method_44557Lnet/minecraft/class_7557$class_7558;method_44557()Ljava/util/UUID;named getSenderUuidLnet/minecraft/client/report/ReceivedMessage$ChatMessage;getSenderUuid()Ljava/util/UUID;
-
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). -
profile
public com.mojang.authlib.GameProfile profile()Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
trustLevel
Returns the value of thetrustLevelrecord component.- Returns:
- the value of the
trustLevelrecord component
-