Package net.minecraft.network.chat
Record Class ChatSender
java.lang.Object
java.lang.Record
net.minecraft.network.chat.ChatSender
public record ChatSender(UUID profileId, @Nullable ProfilePublicKey profilePublicKey)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final UUID
The field for theprofileId
record component.private final ProfilePublicKey
The field for theprofilePublicKey
record component.static final ChatSender
-
Constructor Summary
ConstructorDescriptionChatSender
(UUID profileId, ProfilePublicKey profilePublicKey) Creates an instance of aChatSender
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isSystem()
Returns the value of theprofileId
record component.Returns the value of theprofilePublicKey
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
profileId
The field for theprofileId
record component. -
profilePublicKey
The field for theprofilePublicKey
record component. -
SYSTEM
-
-
Constructor Details
-
ChatSender
Creates an instance of aChatSender
record class.- Parameters:
profileId
- the value for theprofileId
record componentprofilePublicKey
- the value for theprofilePublicKey
record component
-
-
Method Details
-
isSystem
public boolean isSystem() -
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)
. -
profileId
Returns the value of theprofileId
record component.- Returns:
- the value of the
profileId
record component
-
profilePublicKey
Returns the value of theprofilePublicKey
record component.- Returns:
- the value of the
profilePublicKey
record component
-