From 8d3c6e1052094dba40a9db3b7a56f09351ce4d39 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 2 Oct 2024 13:49:39 +0200 Subject: [PATCH] Fix hex color check --- patches/server/Adventure.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 4de7e0f593..e80232d60e 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -5606,6 +5606,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/s index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +@@ -0,0 +0,0 @@ public final class CraftChatMessage { + this.hex.append(c); + + if (this.hex.length() == 7) { +- this.modifier = StringMessage.RESET.withColor(TextColor.parseColor(this.hex.toString()).result().get()); ++ this.modifier = StringMessage.RESET.withColor(TextColor.parseColor(this.hex.toString()).result().orElse(null)); // Paper + this.hex = null; + } + } else if (format.isFormat() && format != ChatFormatting.RESET) { @@ -0,0 +0,0 @@ public final class CraftChatMessage { public static String fromComponent(Component component) {