Class ClientboundPlayerChatPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundPlayerChatPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundPlayerChatPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) ClientboundPlayerChatPacket(UUID sender, int index, byte @Nullable [] messageSignature, String content, long timeStamp, long salt, List<MessageSignature> lastSeenMessages, @Nullable net.kyori.adventure.text.Component unsignedContent, ChatFilterType filterMask, Holder<ChatType> chatType, net.kyori.adventure.text.Component name, @Nullable net.kyori.adventure.text.Component targetName) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintgetIndex()byte @Nullable []net.kyori.adventure.text.ComponentgetName()longgetSalt()@Nullable net.kyori.adventure.text.Componentlong@Nullable net.kyori.adventure.text.ComponentinthashCode()voidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.@NonNull StringtoString()@NonNull ClientboundPlayerChatPacketwithChatType(Holder<ChatType> chatType) @NonNull ClientboundPlayerChatPacketwithContent(String content) @NonNull ClientboundPlayerChatPacketwithFilterMask(ChatFilterType filterMask) @NonNull ClientboundPlayerChatPacketwithIndex(int index) @NonNull ClientboundPlayerChatPacketwithLastSeenMessages(List<MessageSignature> lastSeenMessages) @NonNull ClientboundPlayerChatPacketwithMessageSignature(byte @Nullable [] messageSignature) @NonNull ClientboundPlayerChatPacketwithName(net.kyori.adventure.text.Component name) @NonNull ClientboundPlayerChatPacketwithSalt(long salt) @NonNull ClientboundPlayerChatPacketwithSender(UUID sender) @NonNull ClientboundPlayerChatPacketwithTargetName(@Nullable net.kyori.adventure.text.Component targetName) @NonNull ClientboundPlayerChatPacketwithTimeStamp(long timeStamp) @NonNull ClientboundPlayerChatPacketwithUnsignedContent(@Nullable net.kyori.adventure.text.Component unsignedContent) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ClientboundPlayerChatPacket
-
ClientboundPlayerChatPacket
public ClientboundPlayerChatPacket(UUID sender, int index, byte @Nullable [] messageSignature, String content, long timeStamp, long salt, List<MessageSignature> lastSeenMessages, @Nullable net.kyori.adventure.text.Component unsignedContent, ChatFilterType filterMask, Holder<ChatType> chatType, net.kyori.adventure.text.Component name, @Nullable net.kyori.adventure.text.Component targetName)
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceMinecraftPacket
-
shouldRunOnGameThread
public boolean shouldRunOnGameThread()Description copied from interface:PacketGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Specified by:
shouldRunOnGameThreadin interfacePacket- Returns:
- Whether the packet be handled async from the Netty thread.
-
getSender
-
getIndex
public int getIndex() -
getMessageSignature
public byte @Nullable [] getMessageSignature() -
getContent
-
getTimeStamp
public long getTimeStamp() -
getSalt
public long getSalt() -
getLastSeenMessages
-
getUnsignedContent
public @Nullable net.kyori.adventure.text.Component getUnsignedContent() -
getFilterMask
-
getChatType
-
getName
public net.kyori.adventure.text.Component getName() -
getTargetName
public @Nullable net.kyori.adventure.text.Component getTargetName() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withSender
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIndex
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessageSignature
public @NonNull ClientboundPlayerChatPacket withMessageSignature(byte @Nullable [] messageSignature) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withContent
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTimeStamp
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSalt
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withLastSeenMessages
public @NonNull ClientboundPlayerChatPacket withLastSeenMessages(List<MessageSignature> lastSeenMessages) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withUnsignedContent
public @NonNull ClientboundPlayerChatPacket withUnsignedContent(@Nullable net.kyori.adventure.text.Component unsignedContent) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFilterMask
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withChatType
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withName
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTargetName
public @NonNull ClientboundPlayerChatPacket withTargetName(@Nullable net.kyori.adventure.text.Component targetName) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-