add locales
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package sh.okx.rankup.messages;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public enum Variable {
|
||||
PLAYER,
|
||||
OLD_RANK,
|
||||
@@ -18,11 +15,5 @@ public enum Variable {
|
||||
PERCENT_DONE,
|
||||
PERCENT_LEFT,
|
||||
SECONDS,
|
||||
SECONDS_LEFT;
|
||||
|
||||
public String replace(String message, String value, String type) {
|
||||
Pattern pattern = Pattern.compile("\\{" + type + "_" + this + "}", Pattern.CASE_INSENSITIVE);
|
||||
Matcher matcher = pattern.matcher(message);
|
||||
return matcher.replaceAll(value);
|
||||
}
|
||||
SECONDS_LEFT
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user