Skip to content

Commit

Permalink
2.3.1 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
LOOHP committed Jun 25, 2020
1 parent b3d3264 commit fa9ead8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions src/com/loohp/interactivechat/Utils/ChatColorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,20 @@ public static BaseComponent applyColor(BaseComponent basecomponent, String color
} else {
basecomponent.setColor(ChatColor.getByChar(color.charAt(1)));
for (int i = 3; i < color.length(); i = i + 2) {
if (ChatColor.getByChar(color.charAt(i)).equals(ChatColor.BOLD)) {
basecomponent.setBold(true);
} else if (ChatColor.getByChar(color.charAt(i)).equals(ChatColor.ITALIC)) {
basecomponent.setItalic(true);
} else if (ChatColor.getByChar(color.charAt(i)).equals(ChatColor.MAGIC)) {
basecomponent.setObfuscated(true);
} else if (ChatColor.getByChar(color.charAt(i)).equals(ChatColor.STRIKETHROUGH)) {
basecomponent.setStrikethrough(true);
} else if (ChatColor.getByChar(color.charAt(i)).equals(ChatColor.UNDERLINE)) {
basecomponent.setUnderlined(true);
}
char cha = color.charAt(i);
if (cha == 'k' || cha == 'l' || cha == 'm' || cha == 'n' || cha == 'o') {
if (ChatColor.getByChar(cha).equals(ChatColor.BOLD)) {
basecomponent.setBold(true);
} else if (ChatColor.getByChar(cha).equals(ChatColor.ITALIC)) {
basecomponent.setItalic(true);
} else if (ChatColor.getByChar(cha).equals(ChatColor.MAGIC)) {
basecomponent.setObfuscated(true);
} else if (ChatColor.getByChar(cha).equals(ChatColor.STRIKETHROUGH)) {
basecomponent.setStrikethrough(true);
} else if (ChatColor.getByChar(cha).equals(ChatColor.UNDERLINE)) {
basecomponent.setUnderlined(true);
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: InteractiveChat
author: loohp
version: 2.3.0
version: 2.3.1
main: com.loohp.interactivechat.InteractiveChat
api-version: 1.13
description: Make the chat interactive
Expand Down

0 comments on commit fa9ead8

Please sign in to comment.