diff --git a/Core/src/main/java/com/plotsquared/core/command/Auto.java b/Core/src/main/java/com/plotsquared/core/command/Auto.java index 4284a9748..5780a817a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Auto.java +++ b/Core/src/main/java/com/plotsquared/core/command/Auto.java @@ -312,15 +312,16 @@ public class Auto extends SubCommand { player.getPlotCount(plotarea.getWorldName())); cost = (size_x * size_z) * cost; if (cost > 0d) { - if (!force && this.econHandler.getMoney(player) < cost && this.econHandler.isSupported()) { + if (!this.econHandler.isSupported()) { + player.sendMessage(TranslatableCaption.of("economy.vault_not_found")); + return false; + } + if (!force && this.econHandler.getMoney(player) < cost) { player.sendMessage( TranslatableCaption.of("economy.cannot_afford_plot"), Template.of("money", this.econHandler.format(cost)), Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))) ); - } else { - player.sendMessage(TranslatableCaption.of("economy.vault_not_found")); - return false; } this.econHandler.withdrawMoney(player, cost); player.sendMessage( diff --git a/Core/src/main/java/com/plotsquared/core/command/Claim.java b/Core/src/main/java/com/plotsquared/core/command/Claim.java index 8e286eb51..f2816400b 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Claim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Claim.java @@ -151,15 +151,16 @@ public class Claim extends SubCommand { PlotExpression costExr = area.getPrices().get("claim"); double cost = costExr.evaluate(currentPlots); if (cost > 0d) { - if (this.econHandler.getMoney(player) < cost && this.econHandler.isSupported()) { + if (!this.econHandler.isSupported()) { + player.sendMessage(TranslatableCaption.of("economy.vault_not_found")); + return false; + } + if (this.econHandler.getMoney(player) < cost) { player.sendMessage( TranslatableCaption.of("economy.cannot_afford_plot"), Template.of("money", this.econHandler.format(cost)), Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player))) ); - } else { - player.sendMessage(TranslatableCaption.of("economy.vault_not_found")); - return false; } this.econHandler.withdrawMoney(player, cost); player.sendMessage(