Record Class LoggedChatMessage.Player
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.LoggedChatMessage.Player
- All Implemented Interfaces:
LoggedChatEvent,LoggedChatMessage,LoggedChatMessageLink
- Enclosing interface:
- LoggedChatMessage
public static record LoggedChatMessage.Player(com.mojang.authlib.GameProfile profile, Component displayName, PlayerChatMessage message, ChatTrustLevel trustLevel)
extends Record
implements LoggedChatMessage, LoggedChatMessageLink
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.multiplayer.chat.LoggedChatMessage
LoggedChatMessage.Player, LoggedChatMessage.SystemNested classes/interfaces inherited from interface net.minecraft.client.multiplayer.chat.LoggedChatMessageLink
LoggedChatMessageLink.Header -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentThe field for thedisplayNamerecord component.private final PlayerChatMessageThe field for themessagerecord component.private final com.mojang.authlib.GameProfileThe field for theprofilerecord component.private static final DateTimeFormatterprivate final ChatTrustLevelThe field for thetrustLevelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayer(com.mojang.authlib.GameProfile profile, Component displayName, PlayerChatMessage message, ChatTrustLevel trustLevel) Creates an instance of aPlayerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]booleanReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.private Componentfinal inthashCode()Returns a hash code value for this object.header()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. -
TIME_FORMATTER
-
-
Constructor Details
-
Player
public Player(com.mojang.authlib.GameProfile profile, Component displayName, PlayerChatMessage message, ChatTrustLevel trustLevel) Creates an instance of aPlayerrecord class.- Parameters:
profile- the value for theprofilerecord componentdisplayName- the value for thedisplayNamerecord componentmessage- the value for themessagerecord componenttrustLevel- the value for thetrustLevelrecord component
-
-
Method Details
-
toContentComponent
- Specified by:
toContentComponentin interfaceLoggedChatMessage
-
toNarrationComponent
- Specified by:
toNarrationComponentin interfaceLoggedChatMessage
-
toHeadingComponent
-
getTimeComponent
-
canReport
- Specified by:
canReportin interfaceLoggedChatMessage
-
header
- Specified by:
headerin interfaceLoggedChatMessageLink
-
bodyDigest
public byte[] bodyDigest()- Specified by:
bodyDigestin interfaceLoggedChatMessageLink
-
headerSignature
- Specified by:
headerSignaturein interfaceLoggedChatMessageLink
-
profileId
-
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
-