Player chat: wraps the final Adventure Component produced by Paper’s chat renderer.
Plugin/system messages: uses ProtocolLib to intercept PLAY→SERVER chat packets (SYSTEM_CHAT, DISGUISED_CHAT, CHAT, etc.), decorates payloads (Adventure, WrappedChatComponent, or raw JSON), and writes them back. If mutation isn’t possible, it cancels and re-sends a decorated copy—avoiding duplicates and skipping overlays.
Troubleshooting
Only player chat is copyable: install/update ProtocolLib to a build compatible with your Paper version.
No debug lines while testing: run /cccdebug to turn logs ON, then trigger messages (/plugins, /say hello, Skript broadcasts).
Using Bedrock: copy-to-clipboard won’t work on Bedrock clients; test with a Java client.
Performance Notes
Packet modifications are lightweight. The fallback “cancel & resend” path triggers only when a message can’t be safely patched in-place.