add removeColorCode
This commit is contained in:
parent
3c6bb074d8
commit
1ce07cce81
@ -63,6 +63,19 @@ public class Replace {
|
|||||||
return rp;
|
return rp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String removeColorCode(String value){
|
||||||
|
String text = value.replace("&", "§");
|
||||||
|
while(text.contains("§")){
|
||||||
|
int stelle = text.indexOf("§");
|
||||||
|
if(text.length() >= stelle+2) {
|
||||||
|
text = text.substring(0, stelle) + text.substring(stelle + 2);
|
||||||
|
}else{
|
||||||
|
text = text.substring(0, stelle) + text.substring(stelle + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static List<String> replacePrice(String prefix,Player player, List<String> Text, String price) {
|
public static List<String> replacePrice(String prefix,Player player, List<String> Text, String price) {
|
||||||
List<String> rp = new ArrayList();
|
List<String> rp = new ArrayList();
|
||||||
|
Loading…
Reference in New Issue
Block a user