Record Class PlayerChatMessagePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.PlayerChatMessagePacket
- All Implemented Interfaces:
ComponentHolder<ServerPacket>, SendablePacket, ServerPacket, ServerPacket.ComponentHolding, ServerPacket.Play
public record PlayerChatMessagePacket(int globalIndex, UUID sender, int index, byte @Nullable [] signature, SignedMessageBody.Packed messageBody, @Nullable Component unsignedContent, FilterMask filterMask, int msgTypeId, Component msgTypeName, @Nullable Component msgTypeTarget)
extends Record
implements ServerPacket.Play, ServerPacket.ComponentHolding
Represents an outgoing chat message packet.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayerChatMessagePacket(int globalIndex, UUID sender, int index, byte @Nullable [] signature, SignedMessageBody.Packed messageBody, @Nullable Component unsignedContent, FilterMask filterMask, int msgTypeId, Component msgTypeName, @Nullable Component msgTypeTarget) Creates an instance of aPlayerChatMessagePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionGets the components held by this object.copyWithOperator(UnaryOperator<Component> operator) Returns a copy of this object.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterMaskrecord component.intReturns the value of theglobalIndexrecord component.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.Returns the value of themessageBodyrecord component.intReturns the value of themsgTypeIdrecord component.Returns the value of themsgTypeNamerecord component.Returns the value of themsgTypeTargetrecord component.sender()Returns the value of thesenderrecord component.byte @Nullable []Returns the value of thesignaturerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsignedContentrecord component.Methods inherited from interface ComponentHolder
visitComponents
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
PlayerChatMessagePacket
public PlayerChatMessagePacket(int globalIndex, UUID sender, int index, byte @Nullable [] signature, SignedMessageBody.Packed messageBody, @Nullable @Nullable Component unsignedContent, FilterMask filterMask, int msgTypeId, Component msgTypeName, @Nullable @Nullable Component msgTypeTarget) Creates an instance of aPlayerChatMessagePacketrecord class.- Parameters:
globalIndex- the value for theglobalIndexrecord componentsender- the value for thesenderrecord componentindex- the value for theindexrecord componentsignature- the value for thesignaturerecord componentmessageBody- the value for themessageBodyrecord componentunsignedContent- the value for theunsignedContentrecord componentfilterMask- the value for thefilterMaskrecord componentmsgTypeId- the value for themsgTypeIdrecord componentmsgTypeName- the value for themsgTypeNamerecord componentmsgTypeTarget- the value for themsgTypeTargetrecord component
-
-
Method Details
-
components
Description copied from interface:ComponentHolderGets the components held by this object.- Specified by:
componentsin interfaceComponentHolder<ServerPacket>- Returns:
- the components
-
copyWithOperator
Description copied from interface:ComponentHolderReturns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperatorin interfaceComponentHolder<ServerPacket>- Parameters:
operator- the operator- Returns:
- the copy
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
globalIndex
public int globalIndex()Returns the value of theglobalIndexrecord component.- Returns:
- the value of the
globalIndexrecord component
-
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-
messageBody
Returns the value of themessageBodyrecord component.- Returns:
- the value of the
messageBodyrecord component
-
unsignedContent
-
filterMask
Returns the value of thefilterMaskrecord component.- Returns:
- the value of the
filterMaskrecord component
-
msgTypeId
public int msgTypeId()Returns the value of themsgTypeIdrecord component.- Returns:
- the value of the
msgTypeIdrecord component
-
msgTypeName
Returns the value of themsgTypeNamerecord component.- Returns:
- the value of the
msgTypeNamerecord component
-
msgTypeTarget
-