From fbbf352120199be99da7da7424467a7f9b5aa352 Mon Sep 17 00:00:00 2001 From: drtshock Date: Fri, 12 Jun 2015 18:43:59 -0500 Subject: [PATCH] Check for style. --- .../com/massivecraft/factions/zcore/util/TextUtil.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 1b1c9de6..76c32802 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TextUtil.java @@ -71,7 +71,11 @@ public class TextUtil { for (int i = 0; i < chars.length; i++) { if (chars[i] == 'ยง') { if (color != null) { - message.then(text).color(color); + if (color.isColor()) { + message.then(text).color(color); + } else { + message.then(text).style(color); + } text = ""; color = ChatColor.getByChar(chars[i + 1]); } else { @@ -84,7 +88,7 @@ public class TextUtil { } if (text.length() > 0) { if (color != null) { - if(color.isColor()) { + if (color.isColor()) { message.then(text).color(color); } else { message.then(text).style(color);