-
Notifications
You must be signed in to change notification settings - Fork 1
feat(chat): Add hoverable LuckPerms rank prefixes to chat #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
feat(chat): Add hoverable LuckPerms rank prefixes to chat #27
Conversation
Implements a new chat formatting system on the Velocity proxy. - Fetches the user's highest-priority rank from LuckPerms. - Displays a hoverable prefix before the username. - The hover text shows the rank's display name and description, which are configured via LuckPerms meta keys. - All chat processing, including an existing chat filter and the new rank formatting, is now handled asynchronously to prevent server lag. - Adds a `NOTES.md` file explaining how to configure the required LuckPerms meta keys.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
This commit addresses two critical issues with the chat formatting feature: 1. **Duplicate Messages**: The original message and the formatted message were appearing. This is caused by a conflict between the proxy formatter and backend server chat plugins. 2. **Incorrect Prefix Rendering**: The hoverable prefix was showing raw MiniMessage tags instead of the rendered component. The root cause of the rendering issue is that the Velocity API version in use does not support passing Adventure `Component` objects directly to the `PlayerChatEvent` result. It only accepts legacy formatted strings, which do not support hover events. To resolve this and deliver the core hover text feature, the implementation now uses a "deny and broadcast" pattern: - The original `PlayerChatEvent` is denied to prevent Velocity from sending the unformatted message. - A fully formatted `Component` with the hoverable prefix is constructed. - This `Component` is then manually broadcast to all players on the proxy. To fix the duplicate message issue, `NOTES.md` has been updated to instruct server operators to disable any chat formatting plugins on their backend servers, which resolves the conflict.
- Added a hoverable rank prefix to chat messages, displaying the user's highest-priority LuckPerms rank. - The prefix shows the rank's display name and description on hover, with fallbacks for missing metadata. - Updated the chat event handler to deny the original event and broadcast the formatted message to all players on the proxy, ensuring network-wide chat formatting. - Added a NOTES.md file with instructions for server operators on how to configure LuckPerms and avoid duplicate messages.
- Adds a hoverable rank prefix to chat messages, displaying the user's highest-priority LuckPerms rank. - The prefix shows the rank's display name and description on hover, with fallbacks for missing metadata. - Chat messages are broadcast only to players on the sender's current server, establishing a network-wide format standard without globalizing chat. - The chat event handler denies the original event to prevent duplicate messages from backend servers. - Preserves legacy color codes within the chat message content. - Includes NOTES.md with setup instructions for server operators.
This submission adds a new chat formatting system to the Zander Velocity plugin. It introduces hoverable rank prefixes based on LuckPerms metadata, ensuring all processing is done asynchronously to prevent server lag. The changes include updates to the plugin's dependencies, the main plugin class, and the chat event listener, as well as a new
NOTES.mdfile for server operators.PR created automatically by Jules for task 11608040139254196549 started by @benrobson