Merge pull request #115 from Stefan923/1.6.x

Fixed a JSON issue.
This commit is contained in:
DroppingAnvil 2020-05-11 16:47:08 -05:00 committed by GitHub
commit 7d3c4d6e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,11 +65,15 @@ public class TextUtil {
text = ""; text = "";
} }
ChatColor tempColor = ChatColor.getByChar(chars[i + 1]); ChatColor tempColor = ChatColor.getByChar(chars[i + 1]);
if (tempColor.isColor()) { if (tempColor != null) {
if (tempColor == ChatColor.RESET) {
color = ChatColor.WHITE;
} else if (tempColor.isColor()) {
color = tempColor; color = tempColor;
} else { } else {
style = tempColor; style = tempColor;
} }
}
i++; // skip color char i++; // skip color char
} else { } else {
text += chars[i]; text += chars[i];