fix bugs
- remove debug message - make placeholder %rankup_rank_money_<RANK>% use proper money formatting
This commit is contained in:
@@ -47,7 +47,7 @@ public class Placeholders extends PlaceholderExpansion {
|
||||
return simpleFormat.format(orElse(rankups.getRank(parts[2]).getRequirement(parts[3]), Requirement::getValueDouble, 0));
|
||||
} else if(params.startsWith("rank_money_")) {
|
||||
String[] parts = params.split("_", 3);
|
||||
return moneyFormat.format(rankups.getRank(parts[2]).getRequirement("money").getValueDouble());
|
||||
return plugin.formatMoney(rankups.getRank(parts[2]).getRequirement("money").getValueDouble());
|
||||
}
|
||||
|
||||
switch (params) {
|
||||
|
||||
@@ -39,7 +39,6 @@ public class Rankups {
|
||||
}
|
||||
|
||||
public Rank getRank(String name) {
|
||||
System.out.println(name);
|
||||
for(Rank rank : ranks) {
|
||||
if(rank.getName().equalsIgnoreCase(name)) {
|
||||
return rank;
|
||||
|
||||
Reference in New Issue
Block a user