Migrate messaging to UtilitiesOG &-code formatting #2

Merged
NotAlexNoyle merged 1 commits from codex/migrate-to-bukkit-color-codes-and-utilitiesog-api into main 2026-03-18 11:36:55 -04:00
NotAlexNoyle commented 2026-03-18 11:30:26 -04:00 (Migrated from github.com)

Motivation

  • Replace remaining legacy ChatColor/string sendMessage usage with the Utilities-OG formatting APIs so messages use &-style Bukkit color/formatting codes and centralized placeholder/formatting handling.

Description

  • Added a shared sendMessage(CommandSender, String) helper and migrated command/help/list/download/describe/top/give outputs in ImageCommand to use UtilitiesOG.trueogMessage for players and UtilitiesOG.logToConsole for console output with & codes.
  • Replaced action-bar and inline status strings to use &-style codes and updated ActionBarPacket#setText to serialize UtilitiesOG.trueogColorize(...) via GsonComponentSerializer so action-bar packets render formatted text correctly.
  • Updated item metadata to use UtilitiesOG.trueogColorize(...) for item display name and lore instead of concatenating ChatColor constants.
  • Replaced remaining direct ChatColor/sendMessage usages in ItemService and SelectBlockTask with UtilitiesOG-based messages or &-code action-bar calls.

Testing

  • Ran git diff --check which produced no whitespace/patch errors and passed.
  • Ran ./gradlew build which failed before project compilation due to an environment-specific Gradle/Kotlin Java-version parsing error (IllegalArgumentException: 25.0.1), so full compilation could not be validated in this environment.

Codex Task

### Motivation - Replace remaining legacy `ChatColor`/string `sendMessage` usage with the Utilities-OG formatting APIs so messages use `&`-style Bukkit color/formatting codes and centralized placeholder/formatting handling. ### Description - Added a shared `sendMessage(CommandSender, String)` helper and migrated command/help/list/download/describe/top/give outputs in `ImageCommand` to use `UtilitiesOG.trueogMessage` for players and `UtilitiesOG.logToConsole` for console output with `&` codes. - Replaced action-bar and inline status strings to use `&`-style codes and updated `ActionBarPacket#setText` to serialize `UtilitiesOG.trueogColorize(...)` via `GsonComponentSerializer` so action-bar packets render formatted text correctly. - Updated item metadata to use `UtilitiesOG.trueogColorize(...)` for item display name and lore instead of concatenating `ChatColor` constants. - Replaced remaining direct `ChatColor`/`sendMessage` usages in `ItemService` and `SelectBlockTask` with `UtilitiesOG`-based messages or `&`-code action-bar calls. ### Testing - Ran `git diff --check` which produced no whitespace/patch errors and passed. - Ran `./gradlew build` which failed before project compilation due to an environment-specific Gradle/Kotlin Java-version parsing error (`IllegalArgumentException: 25.0.1`), so full compilation could not be validated in this environment. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69bac3c94ef0832f9fdea183cc0fb6a3)
Sign in to join this conversation.