File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/org/maxgamer/quickshop/util Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,11 +1192,18 @@ public static String parseColours(@Nullable String text) {
11921192 if (StringUtils .isEmpty (text )) {
11931193 return "" ;
11941194 }
1195+
11951196 MineDownParser parser = MINEDOWN .get ().parser ();
11961197 parser .reset ();
11971198 //A hack for saving reset character
11981199 text = text .replace ("&r" , "&l&r" ).replace ("§r" , "§l§r" );
1199- return toLegacyText (parser .enable (MineDownParser .Option .LEGACY_COLORS ).backwardsCompatibility (true ).parse (text ).create ());
1200+ String parseResult = toLegacyText (parser .enable (MineDownParser .Option .LEGACY_COLORS ).backwardsCompatibility (true ).parse (text ).create ());
1201+ if (parseResult .isEmpty ()) {
1202+ //Pure color code hack handle
1203+ return parseColours (text + "😂" ).replace ("😂" , "" );
1204+ } else {
1205+ return parseResult ;
1206+ }
12001207 }
12011208
12021209 /**
You can’t perform that action at this time.
0 commit comments