Always ping if prefix is empty & fix quick prefix functionality#761
Always ping if prefix is empty & fix quick prefix functionality#761vilhu-github wants to merge 6 commits intoHexaoxide:trunkfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts chat ping matching when the configured ping prefix is empty, and changes Paper chat handling to preserve/propagate the selected channel when quick-prefix channel selection is involved.
Changes:
- Update ping regex generation so an empty ping prefix matches bare username/display-name mentions.
- Track the resolved chat channel during Paper’s decorate phase and reuse it during the actual chat event to improve quick-prefix channel behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| paper/src/main/java/net/draycia/carbon/paper/listeners/PaperChatListener.java | Stores a per-player channel key during decorate and uses it to select the channel during AsyncChatEvent handling. |
| common/src/main/java/net/draycia/carbon/common/listeners/PingHandler.java | Builds a different ping regex when prefix is empty to always ping on username/display-name mention. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
paper/src/main/java/net/draycia/carbon/paper/listeners/PaperChatListener.java
Show resolved
Hide resolved
paper/src/main/java/net/draycia/carbon/paper/listeners/PaperChatListener.java
Show resolved
Hide resolved
common/src/main/java/net/draycia/carbon/common/listeners/PingHandler.java
Outdated
Show resolved
Hide resolved
…atListener.java Approve Copilot suggestion: improve fallback logic for message routing Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Commit 25b2cc7 seems to fix desync issues, apparently caused by blocking retrieval of data leading to the player getting disconnected:
After this, I haven't encountered this issue again. See Copilot's notes for more information. EDIT: |
|
No changes after modifications based on Copilot's feedback. The errors with checksum mismatches are deeper than I originally expected. This only addresses the ping feature and quick prefix. |
Leaving the ping prefix empty in the config may result in odd behaviour. This checks if the string is empty, and always pings if matched.
Also fixes quick prefix for channels, not sure if that's an ideal way to do it but it works,