Check for style.

This commit is contained in:
drtshock 2015-06-12 18:43:59 -05:00
parent 91877c9d59
commit fbbf352120

View File

@ -71,7 +71,11 @@ public class TextUtil {
for (int i = 0; i < chars.length; i++) { for (int i = 0; i < chars.length; i++) {
if (chars[i] == '§') { if (chars[i] == '§') {
if (color != null) { if (color != null) {
message.then(text).color(color); if (color.isColor()) {
message.then(text).color(color);
} else {
message.then(text).style(color);
}
text = ""; text = "";
color = ChatColor.getByChar(chars[i + 1]); color = ChatColor.getByChar(chars[i + 1]);
} else { } else {
@ -84,7 +88,7 @@ public class TextUtil {
} }
if (text.length() > 0) { if (text.length() > 0) {
if (color != null) { if (color != null) {
if(color.isColor()) { if (color.isColor()) {
message.then(text).color(color); message.then(text).color(color);
} else { } else {
message.then(text).style(color); message.then(text).style(color);