-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Since ChatColor is no longer an anum using formatting codes like &a, &b, &c, etc. Here's the new area in the class that I've been using that seems to work with it when using Strings:
// In ChatParser.java
ChatColor color = ChatColor.getByChar(group_color.charAt(0));
if (color != null) {
switch (color.getName().toUpperCase()) {
case "MAGIC":
current.setObfuscated(true);
break;
case "BOLD":
current.setBold(true);
break;
case "STRIKETHROUGH":
current.setStrikethrough(true);
break;
case "UNDERLINE":
current.setUnderlined(true);
break;
case "ITALIC":
current.setItalic(true);
break;
case "RESET":
color = ChatColor.WHITE;
default:
current = new TextComponent();
current.setColor(color);
current.setBold(forceBold > 0);
current.setItalic(forceItalic > 0);
current.setUnderlined(forceUnderlined > 0);
current.setStrikethrough(forceStrikethrough > 0);
if (!colorDeque.isEmpty()) {
current.setColor(colorDeque.peek());
}
if (!clickEventDeque.isEmpty()) {
current.setClickEvent(clickEventDeque.peek());
}
if (!hoverEventDeque.isEmpty()) {
current.setHoverEvent(hoverEventDeque.peek());
}
}
parsed = true;
}As well as some depreciated code in the ChatParser:
ChatColor.values(),
hoverEventDeque.getLast().getValue(), and
HoverEvent hoverEvent = new HoverEvent(HoverEvent.Action.SHOW_TEXT, components1);.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels