Unable to get the original chat content
myunco opened this issue ยท 1 comments
Make sure you're doing the following
- You're using the latest build for your server version
- This isn't an issue caused by another plugin
- You've checked for duplicate issues
- You didn't use
/reload
Describe the question
The chat content is normalized spaces
This problem will occur in the latest 1.16.5 and 1.17.1
API method(s) used
PacketType.Play.Client.CHAT
event.getPacket().getStrings().read(0)
Expected behavior
Expected Don't normalized space
Code
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Client.CHAT) {
public void onPacketReceiving(PacketEvent event) {
System.out.println("event.getPacket().getStrings().read(0) = " + event.getPacket().getStrings().read(0));
}
});
Additional context
After repeated testing, I found that there was no such problem before paper-1.16.5-769
The old version of spigot-1.16.5 does not have this problem either