Skip to content

Commit

Permalink
2.5.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
LOOHP committed Jul 4, 2020
1 parent dfacbbf commit 655e34f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/com/loohp/interactivechat/Utils/ChatColorUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,17 @@ public static String addColorToEachWord(String text, String leadingColor) {
}

public static String translateAlternateColorCodes(char code, String text) {
if (text.length() < 2) {
return "";
if (text == null) {
return text;
}

if (text.length() < 2) {
return text;
}

for (int i = 0; i < text.length() - 1; i++) {
if (text.charAt(i) == code) {
if (text.charAt(i + 1) == 'x') {
if (text.charAt(i + 1) == 'x' && text.length() > (i + 14)) {
String section = text.substring(i, i + 14);
String translated = section.replace(code, '§');
text = text.replace(section, translated);
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.5.1
version: 2.5.2
main: com.loohp.interactivechat.InteractiveChat
api-version: 1.13
description: Make the chat interactive
Expand Down

0 comments on commit 655e34f

Please sign in to comment.