File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/org/maxgamer/quickshop/util Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1194,10 +1194,11 @@ public static String parseColours(@Nullable String text) {
11941194 }
11951195 MineDownParser parser = MINEDOWN .get ().parser ();
11961196 parser .reset ();
1197- //MineDown does not support legacy color character, so replace it as well
1198- text = text .replace ('§' , '&' );
1197+
1198+ //Fix some item name using escape character, causing rgb color could not decode correctly
1199+ text = text .replace ("&&x" , "&x" ).replace ("§§x" , "§x" );
11991200 //A hack for saving reset character
1200- text = text .replace ("&r" , "&l&r" );
1201+ text = text .replace ("&r" , "&l&r" ). replace ( "§r" , "§l§r" ) ;
12011202 return toLegacyText (parser .enable (MineDownParser .Option .LEGACY_COLORS ).enable (MineDownParser .Option .APPEND_COLORS_TO_EMPTY_STRING ).backwardsCompatibility (true ).parse (text ).create ());
12021203 }
12031204
You can’t perform that action at this time.
0 commit comments