Replace the proper string in expressions

This commit is contained in:
SirYwell 2021-06-24 19:14:59 +02:00
parent 6a57a5c369
commit 8f48b83c79

View File

@ -348,8 +348,8 @@ public abstract class PlotArea {
this.prices = new HashMap<>(); this.prices = new HashMap<>();
for (String key : priceSection.getKeys(false)) { for (String key : priceSection.getKeys(false)) {
String raw = priceSection.getString(key); String raw = priceSection.getString(key);
if (raw.contains("{args}")) { if (raw.contains("{arg}")) {
raw = raw.replace("{args}", "plots"); raw = raw.replace("{arg}", "plots");
priceSection.set(key, raw); // update if replaced priceSection.set(key, raw); // update if replaced
} }
this.prices.put(key, PlotExpression.compile(raw, "plots")); this.prices.put(key, PlotExpression.compile(raw, "plots"));