Fix MiniMessage hex format and make /find subcommands use configured names #2

Merged
NotAlexNoyle merged 1 commits from codex/convert-hex-colors-for-minimessage into master 2026-02-18 12:30:16 -05:00
NotAlexNoyle commented 2026-02-18 12:05:14 -05:00 (Migrated from github.com)

Motivation

  • Convert legacy &#RRGGBB hex tokens to MiniMessage-compatible format so UtilitiesOG.trueogColorize(...) can parse colors correctly.
  • Ensure /find command routing and tab-completion respect configured subcommand names (e.g. TO_BUY, TO_SELL, custom hide/reveal) while keeping legacy buy/sell/hide/reveal aliases for compatibility.

Description

  • Replaced help message hex tokens from &#RRGGBB to MiniMessage format <#RRGGBB> in src/main/java/io/myzticbean/finditemaddon/FindItemAddOnOG.java so MiniMessage parsing works for help output and aliases.
  • Added helper methods getSubCommandName(Object) and matchesSubCommand(String, String, Object) to resolve and match configured subcommand names at runtime.
  • Constructed subcommand instances once in the /find executor and routed both command invocation and tab-completion through those instances using invokeSubCommand/invokeTabComplete so configured names are recognized.
  • Expanded tab-complete options to include both the subcommands' configured names and legacy names (sell, buy, hide, reveal, hideshop, revealshop).
  • Updated src/main/resources/sample-config.yml comment to document MiniMessage hex usage (<#55a800>) instead of the old &#55a800 notation.

Testing

  • Ran a repo-wide search for legacy hex tokens with rg -n "&#[0-9A-Fa-f]{6}" src/main/java src/main/resources README.md src/main/doc/README.md and confirmed no remaining &#RRGGBB occurrences (success).
  • Attempted to run unit/build tests with ./gradlew test which failed due to a missing gradle/wrapper/gradle-wrapper.jar in the environment (automated test: failed).
  • Attempted gradle test / JAVA_HOME=... gradle test to validate under a specific JDK; the build failed during project bootstrap from settings.gradle.kts (automated test: failed).

Codex Task

### Motivation - Convert legacy `&#RRGGBB` hex tokens to MiniMessage-compatible format so `UtilitiesOG.trueogColorize(...)` can parse colors correctly. - Ensure `/find` command routing and tab-completion respect configured subcommand names (e.g. `TO_BUY`, `TO_SELL`, custom hide/reveal) while keeping legacy `buy/sell/hide/reveal` aliases for compatibility. ### Description - Replaced help message hex tokens from `&#RRGGBB` to MiniMessage format `<#RRGGBB>` in `src/main/java/io/myzticbean/finditemaddon/FindItemAddOnOG.java` so MiniMessage parsing works for help output and aliases. - Added helper methods `getSubCommandName(Object)` and `matchesSubCommand(String, String, Object)` to resolve and match configured subcommand names at runtime. - Constructed subcommand instances once in the `/find` executor and routed both command invocation and tab-completion through those instances using `invokeSubCommand`/`invokeTabComplete` so configured names are recognized. - Expanded tab-complete options to include both the subcommands' configured names and legacy names (`sell`, `buy`, `hide`, `reveal`, `hideshop`, `revealshop`). - Updated `src/main/resources/sample-config.yml` comment to document MiniMessage hex usage (`<#55a800>`) instead of the old `&#55a800` notation. ### Testing - Ran a repo-wide search for legacy hex tokens with `rg -n "&#[0-9A-Fa-f]{6}" src/main/java src/main/resources README.md src/main/doc/README.md` and confirmed no remaining `&#RRGGBB` occurrences (success). - Attempted to run unit/build tests with `./gradlew test` which failed due to a missing `gradle/wrapper/gradle-wrapper.jar` in the environment (automated test: failed). - Attempted `gradle test` / `JAVA_HOME=... gradle test` to validate under a specific JDK; the build failed during project bootstrap from `settings.gradle.kts` (automated test: failed). ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6995c24d5aa8832f8897d7c912780d64)
Sign in to join this conversation.