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.System
Nested classes/interfaces inherited from interface net.minecraft.client.multiplayer.chat.LoggedChatMessageLink
LoggedChatMessageLink.Header
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Component
The field for thedisplayName
record component.private final PlayerChatMessage
The field for themessage
record component.private final com.mojang.authlib.GameProfile
The field for theprofile
record component.private static final DateTimeFormatter
private final ChatTrustLevel
The field for thetrustLevel
record component. -
Constructor Summary
ConstructorDescriptionPlayer
(com.mojang.authlib.GameProfile profile, Component displayName, PlayerChatMessage message, ChatTrustLevel trustLevel) Creates an instance of aPlayer
record class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
boolean
Returns the value of thedisplayName
record component.final boolean
Indicates whether some other object is "equal to" this one.private Component
final int
hashCode()
Returns a hash code value for this object.header()
message()
Returns the value of themessage
record component.com.mojang.authlib.GameProfile
profile()
Returns the value of theprofile
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetrustLevel
record component.
-
Field Details
-
profile
private final com.mojang.authlib.GameProfile profileThe field for theprofile
record component. -
displayName
The field for thedisplayName
record component. -
message
The field for themessage
record component. -
trustLevel
The field for thetrustLevel
record component. -
TIME_FORMATTER
-
-
Constructor Details
-
Player
public Player(com.mojang.authlib.GameProfile profile, Component displayName, PlayerChatMessage message, ChatTrustLevel trustLevel) Creates an instance of aPlayer
record class.- Parameters:
profile
- the value for theprofile
record componentdisplayName
- the value for thedisplayName
record componentmessage
- the value for themessage
record componenttrustLevel
- the value for thetrustLevel
record component
-
-
Method Details
-
toContentComponent
- Specified by:
toContentComponent
in interfaceLoggedChatMessage
-
toNarrationComponent
- Specified by:
toNarrationComponent
in interfaceLoggedChatMessage
-
toHeadingComponent
-
getTimeComponent
-
canReport
- Specified by:
canReport
in interfaceLoggedChatMessage
-
header
- Specified by:
header
in interfaceLoggedChatMessageLink
-
bodyDigest
public byte[] bodyDigest()- Specified by:
bodyDigest
in interfaceLoggedChatMessageLink
-
headerSignature
- Specified by:
headerSignature
in 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 theprofile
record component.- Returns:
- the value of the
profile
record component
-
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
trustLevel
Returns the value of thetrustLevel
record component.- Returns:
- the value of the
trustLevel
record component
-