-
-
Notifications
You must be signed in to change notification settings - Fork 898
fix: /plot info escapes MiniMessage colors #3911 #4722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hm, this might be a conflict of interests. An admin might want to see e.g., hyperlinks, clickable commands, etc. that are part of the message. |
I can add -raw as well, no problem — but I’d open that as a separate enhancement, since this issue is mainly about fixing the 'bug', right? Or did I get that wrong? |
It's probably best to add the option in this PR, as the old behaviour is effectively established now, so we should continue to support it |
|
FWIW I'd really recommend learning how to use git... It'll make everything a lot easier than copy-pasting files into GitHub from (ngl what I assume to be vibe-coded) local changes. Otherwise, surely it's easier to just add an overload to the Plot#format method and add a new boolean for |

Overview
#3911 Fix MiniMessage formatting being escaped in /plot info command
Description
Fixed an issue where MiniMessage formatting in plot flags (greeting, farewell, description, plot-title) was being displayed as escaped/literal text in the
/plot infocommand instead of being properly rendered with formatting.Problem:
When setting flags with MiniMessage formatting like:
The
/plot infocommand would display:Instead of showing the text with proper rainbow formatting.
Root Cause:
The flag display logic in
Plot.javawas usingComponent.text()for all flag values, which treats MiniMessage markup as literal text instead of parsing it as formatting.Solution:
isMiniMessageFlag()method inCaptionUtility.javato identify flags that should be parsed as MiniMessage (greeting, farewell, description, plot-title)Plot.javato conditionally parse MiniMessage flags usingMINI_MESSAGE.deserialize()while keeping other flags as plain textBenefits:
/plot infoTest Cases:
/plot flag set greeting <rainbow>Welcome!</rainbow>→ displays with rainbow formatting/p flag set greeting <gradient:red:blue>Cool plot</gradient>→ displays with correct formattingSubmitter Checklist
@since TODO.