From 924e045a18f50aef38ced1528f048d70c2f09937 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 16 Apr 2024 20:53:27 +0100 Subject: [PATCH] support more formatting --- .../java/xyz/mcutils/backend/common/ColorUtils.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/mcutils/backend/common/ColorUtils.java b/src/main/java/xyz/mcutils/backend/common/ColorUtils.java index 786d201..580cd51 100644 --- a/src/main/java/xyz/mcutils/backend/common/ColorUtils.java +++ b/src/main/java/xyz/mcutils/backend/common/ColorUtils.java @@ -75,12 +75,21 @@ public final class ColorUtils { nextIsColor = true; continue; } - if (nextIsColor) { // Map the current color to its hex code + if (nextIsColor && !String.valueOf(character).equals("|")) { // Map the current color to its hex code String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), ""); builder.append(""); nextIsColor = false; continue;