misc. changes (check description)
rename SECONDS to SECONDS_LEFT, and add SECONDS. add %rankup_rank_money_left_<rank>% placeholder add permission requirement
This commit is contained in:
@@ -58,9 +58,12 @@ public class MessageBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MessageBuilder replaceFromTo(Prestige prestige) {
|
||||
replace(Variable.FROM, prestige.getFrom());
|
||||
replace(Variable.TO, prestige.getTo());
|
||||
public MessageBuilder replaceFromTo(Rank rank) {
|
||||
if(rank instanceof Prestige) {
|
||||
Prestige prestige = (Prestige) rank;
|
||||
replace(Variable.FROM, prestige.getFrom());
|
||||
replace(Variable.TO, prestige.getTo());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ public enum Variable {
|
||||
AMOUNT_NEEDED,
|
||||
PERCENT_DONE,
|
||||
PERCENT_LEFT,
|
||||
SECONDS;
|
||||
SECONDS,
|
||||
SECONDS_LEFT;
|
||||
|
||||
public String replace(String message, String value, String type) {
|
||||
Pattern pattern = Pattern.compile("\\{" + type + "_" + this + "}", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
Reference in New Issue
Block a user