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, @NotNull 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 net.minestom.server.network.packet.server.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, @NotNull SignedMessageBody.Packed messageBody, @Nullable Component unsignedContent, FilterMask filterMask, int msgTypeId, Component msgTypeName, @Nullable Component msgTypeTarget) Creates an instance of aPlayerChatMessagePacket
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection
<Component> Gets the components held by this object.@NotNull ServerPacket
copyWithOperator
(@NotNull UnaryOperator<Component> operator) Returns a copy of this object.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefilterMask
record component.int
Returns the value of theglobalIndex
record component.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.@NotNull SignedMessageBody.Packed
Returns the value of themessageBody
record component.int
Returns the value of themsgTypeId
record component.Returns the value of themsgTypeName
record component.@Nullable Component
Returns the value of themsgTypeTarget
record component.sender()
Returns the value of thesender
record component.byte @Nullable []
Returns the value of thesignature
record component.final String
toString()
Returns a string representation of this record class.@Nullable Component
Returns the value of theunsignedContent
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.adventure.ComponentHolder
visitComponents
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
PlayerChatMessagePacket
public PlayerChatMessagePacket(int globalIndex, UUID sender, int index, byte @Nullable [] signature, @NotNull SignedMessageBody.Packed messageBody, @Nullable @Nullable Component unsignedContent, FilterMask filterMask, int msgTypeId, Component msgTypeName, @Nullable @Nullable Component msgTypeTarget) Creates an instance of aPlayerChatMessagePacket
record class.- Parameters:
globalIndex
- the value for theglobalIndex
record componentsender
- the value for thesender
record componentindex
- the value for theindex
record componentsignature
- the value for thesignature
record componentmessageBody
- the value for themessageBody
record componentunsignedContent
- the value for theunsignedContent
record componentfilterMask
- the value for thefilterMask
record componentmsgTypeId
- the value for themsgTypeId
record componentmsgTypeName
- the value for themsgTypeName
record componentmsgTypeTarget
- the value for themsgTypeTarget
record component
-
-
Method Details
-
components
Description copied from interface:ComponentHolder
Gets the components held by this object.- Specified by:
components
in interfaceComponentHolder<ServerPacket>
- Returns:
- the components
-
copyWithOperator
@NotNull public @NotNull ServerPacket copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) Description copied from interface:ComponentHolder
Returns a copy of this object. For each component this object holds, the operator is applied to the copy before returning.- Specified by:
copyWithOperator
in 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 thecompare
method from their corresponding wrapper classes. -
globalIndex
public int globalIndex()Returns the value of theglobalIndex
record component.- Returns:
- the value of the
globalIndex
record component
-
sender
Returns the value of thesender
record component.- Returns:
- the value of the
sender
record component
-
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
signature
public byte @Nullable [] signature()Returns the value of thesignature
record component.- Returns:
- the value of the
signature
record component
-
messageBody
Returns the value of themessageBody
record component.- Returns:
- the value of the
messageBody
record component
-
unsignedContent
Returns the value of theunsignedContent
record component.- Returns:
- the value of the
unsignedContent
record component
-
filterMask
Returns the value of thefilterMask
record component.- Returns:
- the value of the
filterMask
record component
-
msgTypeId
public int msgTypeId()Returns the value of themsgTypeId
record component.- Returns:
- the value of the
msgTypeId
record component
-
msgTypeName
Returns the value of themsgTypeName
record component.- Returns:
- the value of the
msgTypeName
record component
-
msgTypeTarget
Returns the value of themsgTypeTarget
record component.- Returns:
- the value of the
msgTypeTarget
record component
-