diff --git a/src/main/java/xyz/mcutils/backend/common/ColorUtils.java b/src/main/java/xyz/mcutils/backend/common/ColorUtils.java index f3baf54..8e628c6 100644 --- a/src/main/java/xyz/mcutils/backend/common/ColorUtils.java +++ b/src/main/java/xyz/mcutils/backend/common/ColorUtils.java @@ -70,32 +70,15 @@ public final class ColorUtils { } for (char character : input.toCharArray()) { - if (character == '§') { // Found color symbol + // Found color symbol, next color is the color + if (character == '§') { nextIsColor = true; continue; } - if (nextIsColor) { // Apply color formatting - // Map the current color to its hex code + if (nextIsColor) { // Map the current color to its hex code String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), ""); - // Check if the current character is a valid color code - if (!color.isEmpty()) { - builder.append(""); - } - nextIsColor = false; // Reset the flag + builder.append(""); + nextIsColor = false; continue; } if (character == ' ') { // Preserve space character