Skip to content

[1.19.3] Some clientbound chat packets are not picked up by packet listeners #2043

@LOOHP

Description

@LOOHP
  • This issue is not solved in a development build

Describe the bug
Some clientbound chat packets are not picked up by packet listeners, the didn't fire the onPacketSending method entirely. Only some of them are lost, not all. Some messages fire the listener just as normal.

To Reproduce

ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(PacketAdapter.params().plugin(plugin).listenerPriority(ListenerPriority.MONITOR).types(PacketType.Play.Server.SYSTEM_CHAT, PacketType.Play.Server.CHAT)) {
    @Override
    public void onPacketSending(PacketEvent event) {
        System.out.println(event.getPacketType());
    }
});

Listen to all types of clientbound chat packets and then send chat messages. Make sure plugins are not cancelling and resending in AsyncPlayerChatEvent or other similar events, modification is fine.

Expected behavior
Packets are picked up by the listener.

Screenshots
N/A

Version Info
https://pastebin.com/KeYaS1Ez

Additional context
I suspect it has something to do with where the messages originate from/whether it is sync or async.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions