Record Class OutgoingChatMessage.Player
java.lang.Object
java.lang.Record
net.minecraft.network.chat.OutgoingChatMessage.Player
- All Implemented Interfaces:
OutgoingChatMessage
- Enclosing interface:
OutgoingChatMessage
public static record OutgoingChatMessage.Player(PlayerChatMessage message)
extends Record
implements OutgoingChatMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface OutgoingChatMessage
OutgoingChatMessage.Disguised, OutgoingChatMessage.Player -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PlayerChatMessageThe field for themessagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayer(PlayerChatMessage message) Creates an instance of aPlayerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.voidsendToPlayer(ServerPlayer player, boolean filtered, ChatType.Bound chatType) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
message
The field for themessagerecord component.
-
-
Constructor Details
-
Player
Creates an instance of aPlayerrecord class.- Parameters:
message- the value for themessagerecord component
-
-
Method Details
-
content
- Specified by:
contentin interfaceOutgoingChatMessage
-
sendToPlayer
- Specified by:
sendToPlayerin interfaceOutgoingChatMessage
-
toString
-
hashCode
-
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). -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-