Skip to content

Conversation

@Rollczi
Copy link
Member

@Rollczi Rollczi commented Oct 21, 2025

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Rollczi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on resolving issues related to legacy formatting, particularly when user permissions are a factor. It streamlines the processing of legacy color and formatting codes by removing redundant pre- and post-processors and consolidating the logic for clearing section symbols directly into the conversion to Adventure components. This ensures that chat formatting correctly respects user permissions and prevents unintended stripping of styles. Additionally, the build environment has been enhanced with common server plugins to facilitate development and testing.

Highlights

  • Legacy Formatting Refactor: The handling of legacy formatting codes has been significantly refactored, removing dedicated pre and post-processors from the MiniMessage setup.
  • Consolidated Section Clearing: The Legacy.clearSection logic has been integrated directly into the Legacy.legacyToAdventure method, ensuring that section symbols are processed within the permission-aware conversion flow.
  • Improved Permission Checks: The permission checking mechanism for legacy color and decoration codes has been simplified and clarified, ensuring correct application based on user permissions.
  • Build Configuration Update: The build.gradle.kts file has been updated to include LuckPerms and VaultUnlocked plugins for the server run task, likely for testing or development purposes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively refactors the legacy chat formatting logic by removing the MiniMessage pre/post processors and centralizing the conversion and permission checking within the Legacy utility class. This resolves a bug related to wildcard permissions for colors and decorations, making the permission handling more precise. The overall changes improve code clarity and maintainability. I have one suggestion to further enhance the readability of the permission checking logic.

@Rollczi Rollczi requested review from Jakubk15 and noyzys October 30, 2025 23:30
String result = clearSection(input);
result = HEX_LEGACY_VANILLA_PATTERN.matcher(result).replaceAll(matchResult -> {
String hexColor = matchResult.group().replace("&x", "").replace("&", "");
return "<#" + hexColor + ">";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vLuckyyy vLuckyyy merged commit e291a2e into master Nov 6, 2025
2 checks passed
@vLuckyyy vLuckyyy deleted the GH-182-Fix-Legacy-formatting-when-user-does-not-have-permission branch November 6, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GH-182 Legacy formatting works when user does not have permission.

5 participants