File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/maxgamer/quickshop/util Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -567,6 +567,9 @@ public static String getItemCustomName(@NotNull ItemStack itemStack) {
567567 if (displayName == null || displayName .isEmpty ()) {
568568 return null ;
569569 } else {
570+ //Some item name using escape character, causing rgb color could not decode correctly
571+ //So fix it there
572+ displayName = displayName .replace ("&&x" , "&x" ).replace ("§§x" , "§x" );
570573 return displayName ;
571574 }
572575 }
@@ -1195,8 +1198,6 @@ public static String parseColours(@Nullable String text) {
11951198 MineDownParser parser = MINEDOWN .get ().parser ();
11961199 parser .reset ();
11971200
1198- //Fix some item name using escape character, causing rgb color could not decode correctly
1199- text = text .replace ("&&x" , "&x" ).replace ("§§x" , "§x" );
12001201 //A hack for saving reset character
12011202 text = text .replace ("&r" , "&l&r" ).replace ("§r" , "§l§r" );
12021203 return toLegacyText (parser .enable (MineDownParser .Option .LEGACY_COLORS ).enable (MineDownParser .Option .APPEND_COLORS_TO_EMPTY_STRING ).backwardsCompatibility (true ).parse (text ).create ());
You can’t perform that action at this time.
0 commit comments