Skip to content

Commit 6f40a2a

Browse files
Fix coloring issue when using §
1 parent 2a405f9 commit 6f40a2a

File tree

1 file changed

+3
-1
lines changed
  • src/main/java/org/maxgamer/quickshop/util

1 file changed

+3
-1
lines changed

src/main/java/org/maxgamer/quickshop/util/Util.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,8 +1194,10 @@ 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('§', '&');
11971199
//A hack for saving reset character
1198-
text = text.replace("&r", "&l&r").replace("§r", "§l§r");
1200+
text = text.replace("&r", "&l&r");
11991201
return toLegacyText(parser.enable(MineDownParser.Option.LEGACY_COLORS).enable(MineDownParser.Option.APPEND_COLORS_TO_EMPTY_STRING).backwardsCompatibility(true).parse(text).create());
12001202
}
12011203

0 commit comments

Comments
 (0)