KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
678 stars 103 forks source link

MiniMessage strips "redundant" tags which does not allow me to set prefixes as I can with legacy color codes #1085

Closed Folas1337 closed 2 weeks ago

Folas1337 commented 2 weeks ago

It's probably ideal to read up on this issue which I just opened and closed again as I was forwarded to here: https://github.com/NEZNAMY/TAB/issues/1312

My use case is basically I want to use a color code in a prefix, so I'm doing something for LuckPerms like '/lp group default meta setprefix "\<green>"' so the prefix is nothing but . The problem is that with MiniMessage if the message ends in just it will be stripped which is not the case with legacy color code like &a.

Now I have to either create a pretty horrible workaround by creating a meta for the groups that's legacy code while using MiniMessage in others and that thought is already driving me nuts.

Can we not have MiniMessage act like legacy code and carry over a color code if it ends in a color tag?

I know in most cases you'll have a string like "\<green>This is really funny\<blue>" in which you want to strip the but in cases like mine, there might be more components to the text which aren't included in just one string, so you would want it to actually use the from the previous string.

I hope I didn't ramble too much and this does make some sense. It's a little hard to explain all this but I tried the best I can. If you need further information, let me know.

zml2008 commented 2 weeks ago

you could use parsed placeholders for that, or parse MM while disabling the compacting post-processor. no changes to MM are planned