Fix MiniMessage formatting: default italic on panel items and cross-nested tags in legacyToMiniMessage#2903
Merged
tastybento merged 2 commits intodevelopfrom Apr 5, 2026
Conversation
… fix tag nesting in legacyToMiniMessage Two issues fixed: 1. Panel item names and lore were rendered italic by default because Minecraft applies italic styling to item components. Now explicitly sets italic=false on the root component when not already set. 2. legacyToMiniMessage produced cross-nested tags when bold/decorations carried through a color code change without §r reset, causing closing tags like </bold> to appear as literal text. Now properly closes and reopens decoration tags around color changes to maintain valid nesting. Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/f04f5542-587b-4770-917c-d7a22a86563c Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix minimassage format to resolve incorrect tag rendering
Fix MiniMessage formatting: default italic on panel items and cross-nested tags in legacyToMiniMessage
Apr 5, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Panel items render all text italic and show literal
</bold>tags in-game, despite correct MiniMessage markup in locale files.Default italic on panel items
Minecraft applies italic by default to item display names and lore.
PanelItem.setName()andsetDescription()passed Adventure components tometa.displayName()/meta.lore()without overriding this. Now wraps parsed components withitalic=falsewhen italic is not explicitly set:Cross-nested tags in
legacyToMiniMessageAdventure's
LegacyComponentSerializerdoesn't emit§rwhen bold ends at a color boundary.§c§lALL §atext(bold carries through color change) was converted to:MiniMessage can't match
</bold>after</green>is already closed, so it renders as literal text. Fixed by closing decoration tags before color tags, then reopening them:The same fix is applied to hex color code (
<color:#RRGGBB>) handling in the same method.