From 53a26188d43c8946bca0fdd074608e31c8533a89 Mon Sep 17 00:00:00 2001 From: sergiobernalparrondo Date: Thu, 20 Jan 2022 11:15:04 +0100 Subject: [PATCH] Added x to unParse --- .../java/io/github/divios/jtext/parsers/legacyColorParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/divios/jtext/parsers/legacyColorParser.java b/src/main/java/io/github/divios/jtext/parsers/legacyColorParser.java index 557d600..71ac39e 100644 --- a/src/main/java/io/github/divios/jtext/parsers/legacyColorParser.java +++ b/src/main/java/io/github/divios/jtext/parsers/legacyColorParser.java @@ -11,7 +11,7 @@ public String parse(String s) { public String unparse(String s) { char[] array = s.toCharArray(); for (int i = 0; i < array.length - 1; i++) { - if (array[i] == ChatColor.COLOR_CHAR && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(array[i + 1]) != -1) { + if (array[i] == ChatColor.COLOR_CHAR && "x0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(array[i + 1]) != -1) { array[i] = '&'; array[i + 1] = Character.toLowerCase(array[i + 1]); }