diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Merge.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Merge.java index 99b35ceb5..5eb61f42d 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Merge.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Merge.java @@ -74,7 +74,9 @@ public class Merge extends SubCommand { final PlotArea plotArea = plot.getArea(); Expression priceExr = plotArea.PRICES.containsKey("merge") ? plotArea.PRICES.get("merge") : null; final int size = plot.getConnectedPlots().size(); - double price = priceExr == null ? 0d : priceExr.evalute((double) size); + System.out.println("EXPRESSIONL " + priceExr); + final double price = priceExr == null ? 0d : priceExr.evalute((double) size); + System.out.println("PRICE: " + price + " | " + EconHandler.manager + " | " + plotArea.USE_ECONOMY); if (EconHandler.manager != null && plotArea.USE_ECONOMY && price > 0d && EconHandler.manager.getMoney(player) < price) { sendMessage(player, C.CANNOT_AFFORD_MERGE, String.valueOf(price)); return false; diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Expression.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Expression.java index feb577591..8cd0c0ce9 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Expression.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Expression.java @@ -32,7 +32,7 @@ public abstract class Expression { } catch (Exception ignore) {} if (expression.endsWith("*{arg}")) { try { - return linearDouble(Double.parseDouble(expression.substring(0, expression.length() - 8))); + return linearDouble(Double.parseDouble(expression.substring(0, expression.length() - 6))); } catch (Exception ignore) {} } return new Expression() {