Skip to content

SYSTEM_CHAT_MESSAGE will cause the NBT information of show_item to be lost #1448

@xiaozhangup

Description

@xiaozhangup

When I use the following code to modify the message content of SystemChat (modifying show_item's nbt), all the item information in the final modified packet is lost

                PacketType.Play.Server.SYSTEM_CHAT_MESSAGE -> {
                    val wrapper = WrapperPlayServerSystemChatMessage(e)
val message = wrapper.message
                    wrapper.message = DisplayReplacer.inst.apply(message, player)
                    info("B")
                }

Below is the content received by the player when using Player.sendMessage(Component) and when wrapper.message = Component (the content starting with "Re" is from sendMessage):

Image Image
PacketEvents: 2.11.2
Server: Paper 1.21.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions