From 0a60199e79dca6d240cd95ca40d50226ca56b0ec Mon Sep 17 00:00:00 2001 From: ItsFlicker <1812496278@qq.com> Date: Mon, 25 Mar 2024 22:07:28 +0800 Subject: [PATCH] [2.1.0] Fix hex color --- .../main/java/me/arasple/mc/trchat/util/color/HexUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project/runtime-bukkit/src/main/java/me/arasple/mc/trchat/util/color/HexUtils.java b/project/runtime-bukkit/src/main/java/me/arasple/mc/trchat/util/color/HexUtils.java index f517c8b8..5e36d118 100644 --- a/project/runtime-bukkit/src/main/java/me/arasple/mc/trchat/util/color/HexUtils.java +++ b/project/runtime-bukkit/src/main/java/me/arasple/mc/trchat/util/color/HexUtils.java @@ -247,9 +247,9 @@ private static int findStop(String content, int searchAfter) { } private static String cleanHex(String hex) { - if (hex.startsWith("<") || hex.startsWith("{")) { - return hex.substring(1, hex.length() - 1); - } else if (hex.startsWith("&")) { + if (hex.startsWith("&{")) { + return hex.substring(2, hex.length() - 1); + } else if (hex.startsWith("&#")) { return hex.substring(1); } else { return hex;