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<>();
for (String key : priceSection.getKeys(false)) {
String raw = priceSection.getString(key);
if (raw.contains("{args}")) {
raw = raw.replace("{args}", "plots");
if (raw.contains("{arg}")) {
raw = raw.replace("{arg}", "plots");
priceSection.set(key, raw); // update if replaced
}
this.prices.put(key, PlotExpression.compile(raw, "plots"));