From 7591d88d0005e8983ffb52bc9e6c3196105b40bf Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Tue, 23 Mar 2021 23:44:27 +0100 Subject: [PATCH] Fixes PS-229 Closes #2948 Co-Authored-By: Benjamin Govaerts <17101059+BenjaminGoGurts@users.noreply.github.com> --- Core/src/main/java/com/plotsquared/core/command/Auto.java | 3 ++- Core/src/main/java/com/plotsquared/core/command/Claim.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 c6a17007d..ccba82249 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Auto.java +++ b/Core/src/main/java/com/plotsquared/core/command/Auto.java @@ -142,7 +142,8 @@ public class Auto extends SubCommand { } else { player.sendMessage( TranslatableCaption.of("permission.cant_claim_more_plots"), - Template.of("amount", "0") + Template.of("amount", String.valueOf(player.getAllowedPlots()) + ) ); return false; } 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 b294de280..6bfc6d325 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Claim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Claim.java @@ -107,17 +107,18 @@ public class Claim extends SubCommand { if (metaDataAccess.isPresent()) { grants = metaDataAccess.get().orElse(0); if (grants <= 0) { - metaDataAccess.remove(); player.sendMessage( TranslatableCaption.of("permission.cant_claim_more_plots"), Template.of("amount", String.valueOf(grants)) ); + metaDataAccess.remove(); } } else { player.sendMessage( TranslatableCaption.of("permission.cant_claim_more_plots"), - Template.of("amount", String.valueOf(grants)) + Template.of("amount", String.valueOf(player.getAllowedPlots())) ); + return false; } }