diff options
author | Nassim Jahnke <[email protected]> | 2024-10-02 13:49:39 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-10-02 13:49:39 +0200 |
commit | 69ffbec34a22d20701e62481c3718fa2f0bbc2ef (patch) | |
tree | f91f903f83d4e1d4a0c69485b70679a1c36ddaae /patches/server/0010-Adventure.patch | |
parent | e7e1ab56ca2a401aabacaee2de5818a93886bea3 (diff) | |
download | Paper-69ffbec34a22d20701e62481c3718fa2f0bbc2ef.tar.gz Paper-69ffbec34a22d20701e62481c3718fa2f0bbc2ef.zip |
Fix hex color check
Diffstat (limited to 'patches/server/0010-Adventure.patch')
-rw-r--r-- | patches/server/0010-Adventure.patch | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index a30b08aa61..e21440350a 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -5603,9 +5603,18 @@ index 4d586e1375ed8782939c9d480479e0dd981f8cbc..7900adb0b158bc17dd792dd082c33854 + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index ff040613083c015d9c52c0995591b64305fd5018..1b552b3f05ac7fc44450de4b1ec78907a0f62424 100644 +index ff040613083c015d9c52c0995591b64305fd5018..95444fd9fecc5bda5462ca8dfeca82c5318f0895 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +@@ -90,7 +90,7 @@ 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) { @@ -264,6 +264,7 @@ public final class CraftChatMessage { public static String fromComponent(Component component) { |