Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Pmaru-top authored Aug 31, 2021
1 parent ef37ca3 commit dcc0b84
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tax/cute/mcpingplugin/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@ public static int random(int Max, int Min) {
}

public static String clearColorCode(String text) {
if(text == null) return null;
if(!text.contains("§")) return text;
if (text == null) return null;
if (!text.contains("§")) return text;

while (text.contains("§")) {
int index = text.indexOf("§");
text = text.replace(text.substring(index,index + 2),"");
if (index + 2 > text.length()) {
break;
}
text = text.replace(text.substring(index, index + 2), "");
}
text = text.replace("§","");
return text;
}

}

0 comments on commit dcc0b84

Please sign in to comment.