Fix hex color check
This commit is contained in:
parent
e7e1ab56ca
commit
69ffbec34a
1 changed files with 10 additions and 1 deletions
|
@ -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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
+++ b/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 {
|
@@ -264,6 +264,7 @@ public final class CraftChatMessage {
|
||||||
|
|
||||||
public static String fromComponent(Component component) {
|
public static String fromComponent(Component component) {
|
||||||
|
|
Loading…
Reference in a new issue