Skip to content

Commit

Permalink
fixed a bug to find next color
Browse files Browse the repository at this point in the history
  • Loading branch information
broken1arrow committed Jul 23, 2022
1 parent 90dcac8 commit 18c7bde
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/org/broken/lib/rbg/TextTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,8 @@ public static int getNextColor(String subMessage) {
public static int getEndOfColor(String subMessage) {
int nextGrad = subMessage.indexOf(">");
int vanillaColor = checkIfContainsColor(subMessage);
if (nextGrad < 0)
nextGrad = 0;
if (vanillaColor < 0)
vanillaColor = 0;

return Math.min(nextGrad, vanillaColor);

return Math.max(nextGrad, vanillaColor);
}

public static String getStringStriped(String message, int startIndex, int endIndex) {
Expand Down

0 comments on commit 18c7bde

Please sign in to comment.