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 aPlayerChatMessagePacketrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<Component> Gets the components held by this object.@NotNull ServerPacketcopyWithOperator(@NotNull 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.@NotNull SignedMessageBody.PackedReturns the value of themessageBodyrecord component.intReturns the value of themsgTypeIdrecord component.Returns the value of themsgTypeNamerecord component.@Nullable ComponentReturns 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.@Nullable ComponentReturns the value of theunsignedContentrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 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
@NotNull public @NotNull ServerPacket copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) 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
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
public byte @Nullable [] 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
Returns the value of theunsignedContentrecord component.- Returns:
- the value of the
unsignedContentrecord component
-
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
Returns the value of themsgTypeTargetrecord component.- Returns:
- the value of the
msgTypeTargetrecord component
-