From 4d05b4a376eb5712a26edf80f212bfec416ab4c9 Mon Sep 17 00:00:00 2001 From: Stefan923 Date: Sun, 10 May 2020 17:18:48 +0300 Subject: [PATCH] Fixed "RESET is not a style/color" error. --- .../massivecraft/factions/zcore/util/TextUtil.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java b/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java index 1b271c0d..335d8f92 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java @@ -65,10 +65,14 @@ public class TextUtil { text = ""; } ChatColor tempColor = ChatColor.getByChar(chars[i + 1]); - if (tempColor.isColor()) { - color = tempColor; - } else { - style = tempColor; + if (tempColor != null) { + if (tempColor == ChatColor.RESET) { + color = ChatColor.WHITE; + } else if (tempColor.isColor()) { + color = tempColor; + } else { + style = tempColor; + } } i++; // skip color char } else {