Skip to content

Commit

Permalink
Fixed 1 more bug
Browse files Browse the repository at this point in the history
  • Loading branch information
broken1arrow committed Jul 22, 2022
1 parent 2591980 commit e71aa96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/broken/lib/rbg/TextTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,9 @@ public static String getStringStriped(String message, int startIndex, int endInd
public static String[] getMultiColors(String message, int startIndex) {
String subcolor = message.substring(startIndex);
int endOfColor = subcolor.indexOf(">");
final String substring = subcolor.substring(0, endOfColor > 0 ? endOfColor + 1 : message.length());
return substring.substring(14, substring.length() - 1).split(":");
final String substring = subcolor.substring(0, endOfColor > 0 ? endOfColor + 1 : subcolor.length());
if (getNextColor(substring) < 0) return new String[0];
return substring.substring(1, substring.length() - 1).split(":");
}

public int getLastGradientMatch(String message, GradientType type) {
Expand Down

0 comments on commit e71aa96

Please sign in to comment.