Grandline Compatibility Fixes 2.0.3
==================================

2.0.3 scoreboard-removal hotfix
--------------------------------
- Removes ALL normal gl_hide_race scoreboard creation, writes, tracking and snapshot transmission from /caracderaca.
- Fixes repeated client FATAL errors: duplicate gl_hide_race objective and overlong scoreboard player names such as ServerPlayerEntity[...].
- PlayerPersisted/grandline_hide_race remains the authoritative saved state.
- Integrated singleplayer synchronizes race visibility through an in-process UUID-keyed mirror, so no network/scoreboard packet is needed while testing solo.
- On command-tree sync or command use, attempts a one-time safe removal of the obsolete gl_hide_race objective left by 2.0.0/2.0.1.
- Keeps /caracderaca ocultar|mostrar|alternar|status, /caracderaça normalization and LuckPerms node grandline.caracderaca.
- Dedicated-server cross-JVM visual synchronization is intentionally not faked through scoreboards anymore; when Grandline moves testing to the real server, add/validate a proper mod packet instead.


2.0.1 race-visual persistence rewrite:
- /caracderaca ocultar|mostrar|alternar|status now stores its authoritative state in the player's Forge persistent NBT under PlayerPersisted/grandline_hide_race.
- The old gl_hide_race scoreboard is no longer the source of truth. It is retained only as a vanilla 1.16.5 synchronization mirror for dedicated clients.
- Integrated singleplayer mirrors state in-process immediately, so the visual toggle works even without Bukkit/Arclight.
- On command-tree sync/login, the mod refreshes persistent states and sends the scoreboard snapshot to the joining viewer.
- Migrates an existing 1.x gl_hide_race value into persistent NBT when possible.
- Fixes the 1.1.10 score lookup by searching inherited/declared transformed methods, not only public methods.
- Keeps LuckPerms/Bukkit permission node: grandline.caracderaca.
- Toggle remains limited to race visuals only. Devil Fruit features, Curios, Cosmetic Armor, weapons, armor and other non-race visuals are untouched.

This release starts the new major-version line. 2.0.1 supersedes every 1.1.x build.
Do not keep an older GrandlineCompatFixes JAR installed beside this one.



1.1.10 race-visual toggle fix:
- Fixes /caracderaca ocultar, mostrar and alternar executing but not changing the visual state.
- Stops using the old mapping-sensitive CompatHooks scoreboard writer for command execution.
- Uses a robust native gl_hide_race scoreboard writer, verifies the written score, and starts tracking the objective so clients receive it.
- Adds an Arclight/Bukkit scoreboard fallback if the native writer is unavailable.
- Redirects CompatHooks.isRaceHidden to the same reader used by /caracderaca status, eliminating command/render disagreement.
- The toggle affects ONLY the explicitly whitelisted race visual layers: Mink, Oni, Lunarian, Sky Folk, Fishman, Cyborg, Tontatta and Giant.
- It does NOT hide Curios, Cosmetic Armor, Devil Fruit features, Santoryu, weapons, armor, or other non-race visuals.
- Keeps LuckPerms/Bukkit permission node grandline.caracderaca from 1.1.9.

This build supersedes 1.1.8. Do not keep both JARs installed.
1.1.9 command + LuckPerms fix:
- Reworks /caracderaca registration again so it is forced into the dispatcher BEFORE Minecraft sends the command tree to a player.
- Also forces registration before command execution as a last-resort safety path.
- Redirects the old CompatHooks registration path into the new robust registrar, so all registration routes use the same implementation.
- Adds optional Arclight/Bukkit/LuckPerms support through permission node: grandline.caracderaca
- Backwards-compatible permission behavior: while the node is not explicitly configured, all players retain access. Once LuckPerms explicitly sets the node, true/false is respected. Operators remain a bypass.
- No LuckPerms API JAR is required; integration is reflective through Bukkit permissions.

1.1.8 command fix:
- Restores /caracderaca ocultar|mostrar|alternar|status with a second, direct registration path.
- The old Forge RegisterCommandsEvent route is retained, but 1.1.8 also injects registration directly into the vanilla Commands dispatcher constructor.
- The dispatcher is identity-guarded, so if both paths fire the command is still registered only once.
- This specifically fixes installs where the prior ForgeEventFactory/event-listener path never became active and the command vanished from chat autocomplete.


1.1.7 changes:
- REMOVED the Locks 3.0.3 coremod transformer. Locks is intentionally being removed from the Grandline modpack, so CompatFix no longer targets a class that may not exist.
- FIXED the actual AwakenAwakenNoMi 0.7.1 + CartAddon 0.8.2 Shigan incompatibility. AwakenAwakenNoMi looks for:
    net.MrMagicalCart.cartaddon.abilities.rokushikiextra.ReworkedShiganAbility
  but CartAddon 0.8.2 contains:
    net.mrmagicalcart.cartaddon.abilities.rokushikiextra.ReworkedShiganAbility
  Java class names are case-sensitive. 1.1.7 corrects only that constant and keeps CartAddon's real private canUnlock logic intact.
- FIXED the sidemod startup log that still reported 1.1.5 inside the 1.1.6 class.
- Preserves the tested 1.1.6 behavior for fruitless abilities, Raid Suit, Zoan cosmetic whitelisting, /caracderaca sync/registration, Cosmetic Armor integration, MatrixStack repair, Morgans auto-news disable and 2-hour wanted-poster air-drop throttle.

Safety decisions retained:
- No mass copying of PlayerRenderer layers to ZoanMorphRenderer.
- No fake global RenderPlayerEvent.Pre/Post broadcasts.
- No Raid Suit size reset.
- Stealth Black stays original.
- No Locks compatibility code remains in this build.

Built for Minecraft 1.16.5 / Forge 36.2.42 / MMNM 0.10.11 / CartAddon 0.8.2.


2.0.1 hotfix
------------
- Fixes /caracderaca command registration failing with IllegalArgumentException: argument type mismatch.
- Root cause: Brigadier has overloaded ArgumentBuilder.then(...) methods; the reflective 2.0.0 registrar could select then(CommandNode) and pass a LiteralArgumentBuilder.
- Registration now selects methods compatible with the actual builder/proxy object for then(...), executes(...), and dispatcher.register(...).
- Keeps 2.0.0 persistent NBT state, same-JVM sync, vanilla scoreboard transport, and LuckPerms permission node grandline.caracderaca.
- Also accepts /caracderaça by normalizing the raw command to the ASCII Brigadier literal before parsing.

2.0.3 SERVER FIX:
- ZitoenPiece automatic faction-owned structure territories no longer silently deny break/build by default.
- Explicit territory permission ALLOW/DENY rules still take priority.
- Manual/player-created territories are unchanged.
- Existing worlds require no NBT/data-file migration; the policy is evaluated at runtime.
