Describe the bug
When a plugin registers a ProtocolLib sending listener on PacketType.Play.Server.BUNDLE with ListenerPriority.MONITOR, ProtocolLib throws IllegalStateException: The packet event is read-only. during outbound processing.
To Reproduce
Steps to reproduce the behavior:
- Register a
PacketAdapter for sending with ListenerPriority.MONITOR and include PacketType.Play.Server.BUNDLE in the whitelist (or use PacketType.values()).
- Trigger normal gameplay actions that cause bundled outbound packets. (In my case, just cancel the PlayerItemConsumeEvent)
Expected behavior
ProtocolLib should not attempt to cancel a read-only event, or should avoid this MONITOR/read-only conflict in the internal BUNDLE handling path.
Version Info
https://just-paste.it/Qk2807a7dp
Additional context
Code: https://just-paste.it/Nx2il2q2ri
Describe the bug
When a plugin registers a ProtocolLib sending listener on
PacketType.Play.Server.BUNDLEwithListenerPriority.MONITOR, ProtocolLib throwsIllegalStateException: The packet event is read-only.during outbound processing.To Reproduce
Steps to reproduce the behavior:
PacketAdapterfor sending withListenerPriority.MONITORand includePacketType.Play.Server.BUNDLEin the whitelist (or usePacketType.values()).Expected behavior
ProtocolLib should not attempt to cancel a read-only event, or should avoid this MONITOR/read-only conflict in the internal BUNDLE handling path.
Version Info
https://just-paste.it/Qk2807a7dp
Additional context
Code: https://just-paste.it/Nx2il2q2ri