Skip to content

[WIP] Fix IllegalStateException on Play.Server.BUNDLE with MONITOR listener#3606

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-illegalstateexception-protocollib
Closed

[WIP] Fix IllegalStateException on Play.Server.BUNDLE with MONITOR listener#3606
Copilot wants to merge 1 commit intomasterfrom
copilot/fix-illegalstateexception-protocollib

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

  • Review the prior PR change and current comment feedback
  • Run existing targeted checks to understand the current baseline
  • Rework the BUNDLE/MONITOR handling with the smallest possible code change
  • Run targeted tests for the touched area
  • Run code review and security scan
  • Reply on the PR comment with the addressing commit hash
Original prompt

This section details on the original issue you should resolve

<issue_title>IllegalStateException on Play.Server.BUNDLE with MONITOR listener: ProtocolLib attempts to cancel read-only PacketEvent</issue_title>
<issue_description>- [x] This issue is not solved in a development build

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:

  1. Register a PacketAdapter for sending with ListenerPriority.MONITOR and include PacketType.Play.Server.BUNDLE in the whitelist (or use PacketType.values()).
  2. 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
</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@dmulloy2
Copy link
Copy Markdown
Owner

@copilot try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IllegalStateException on Play.Server.BUNDLE with MONITOR listener: ProtocolLib attempts to cancel read-only PacketEvent

2 participants