Skip to content

Fix color + add test#221

Merged
Maxlego08 merged 4 commits intoMaxlego08:developfrom
1robie:developement
Feb 6, 2026
Merged

Fix color + add test#221
Maxlego08 merged 4 commits intoMaxlego08:developfrom
1robie:developement

Conversation

@1robie
Copy link
Collaborator

@1robie 1robie commented Feb 5, 2026

This pull request refactors and modularizes the color and formatting utilities used for MiniMessage processing in the Paper hook, improving code organization and maintainability. The main changes involve extracting color conversion logic into a new utility class and updating ComponentMeta to use this utility, along with some cleanup of unused imports and methods.

Refactoring and modularization:

  • Extracted all color and formatting conversion logic (such as legacy hex, short hex, and color code replacement) from ComponentMeta into a new utility class MiniMessageColorUtils, centralizing and reusing this functionality. (Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/MiniMessageColorUtils.java)
  • Updated ComponentMeta to extend MiniMessageColorUtils and removed all in-class color conversion methods and related fields, delegating this responsibility to the new utility class. (Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/ComponentMeta.java) [1] [2] [3]

Code cleanup:

  • Removed unused imports and a no-op test method from ComponentMeta to tidy up the code. (Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/ComponentMeta.java) [1] [2]
  • Removed JUnit test dependencies from the Common/build.gradle.kts file, likely as part of a cleanup or because they are no longer needed. (Common/build.gradle.kts)

@Maxlego08 Maxlego08 merged commit fdcf332 into Maxlego08:develop Feb 6, 2026
2 checks passed
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.

2 participants