mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-26 10:01:56 +01:00
Forgot about dollar symbol in regex
This commit is contained in:
parent
42ae063e41
commit
2a22cbe41a
@ -43,7 +43,7 @@ public class Lang {
|
||||
String translation = instance.translate(s);
|
||||
for (int i = 1; i <= args.length; i++) {
|
||||
System.out.printf("Replace %s with %s%n", "%" + i + "$s", args[i-1].toString());;
|
||||
translation = translation.replaceAll("%" + i + "$s", args[i-1].toString());
|
||||
translation = translation.replaceAll("%" + i + "\\$s", args[i-1].toString());
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
@ -52,7 +52,7 @@ public class Lang {
|
||||
String translation = instance.translateColor(s);
|
||||
for (int i = 1; i <= args.length; i++) {
|
||||
System.out.printf("Replace %s with %s%n", "%" + i + "$s", args[i-1].toString());;
|
||||
translation = translation.replaceAll("%" + i + "$s", args[i-1].toString());
|
||||
translation = translation.replaceAll("%" + i + "\\$s", args[i-1].toString());
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user