diff --git a/Core/src/main/java/com/plotsquared/core/command/Deny.java b/Core/src/main/java/com/plotsquared/core/command/Deny.java index a0df81a0e..69d7b434c 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Deny.java +++ b/Core/src/main/java/com/plotsquared/core/command/Deny.java @@ -51,7 +51,7 @@ import java.util.concurrent.TimeoutException; @CommandDeclaration(command = "deny", aliases = {"d", "ban"}, - usage = "/plot deny ", + usage = "/plot deny player, String[] args) { Location location = player.getLocation(); - Plot plot = location.getPlotAbs(); - final Plot currentPlot = player.getCurrentPlot(); - int size = currentPlot.getDenied().size(); + final Plot plot = location.getPlotAbs(); if (plot == null) { player.sendMessage(TranslatableCaption.of("errors.not_in_plot")); return false; @@ -94,6 +92,7 @@ public class Deny extends SubCommand { } int maxDenySize = Permissions.hasPermissionRange(player, Permission.PERMISSION_DENY, Settings.Limit.MAX_PLOTS); + int size = plot.getDenied().size(); if (size > (maxDenySize - 1)) { player.sendMessage( TranslatableCaption.of("members.plot_max_members_denied"),