1.19 regression: PacketType.Play.Server.CHAT not firing on 5.0.0-SNAPSHOT b569
oddlama opened this issue ยท 4 comments
Describe the bug
Outgoing CHAT packets never fire the packet listener. Seems like a regression of #1576 and/or #1588.
The production code that is affected is in vane, specifically this snippet
I have tried other packet types (e.g. PacketType.Play.Server.LOGIN
) which work as expected.
The dump shows that the listener is registered correctly.
To Reproduce
Vane only registers this single listener, so to reproduce this code (from the linked issues) should suffice:
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(PacketAdapter.params().plugin(plugin).listenerPriority(ListenerPriority.MONITOR).types(PacketType.Play.Server.CHAT)) {
@Override
public void onPacketSending(PacketEvent event) {
System.out.println("not going here.");
}
}
Version Info
5.0.0-SNAPSHOT b569
Thanks a lot! If this is indeed a rename, why has
CHAT
not been deprecated?
Because CHAT is meant to be sent by the server for signed player messages, but spigot decided to (for now) redirect all player chat messages using SYSTEM_CHAT until they have an api allowing to control chat preview and all the other chat suff which is new in 1.19. Both packets still exist, therefore the packet type is not deprecated.