From c973ee8649939d4a31cbe513486a5392b8bf48ab Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Sun, 20 Nov 2022 10:58:04 +0100 Subject: [PATCH] Revert "feat: check merge limits when completing auto-merge (#3868)" - Fixes a bug in 6.10.4 (#3876) Revert "feat: check merge limits when completing auto-merge (#3868)" This reverts commit 25ce7a83f134921c1fc2c69f5d92ecb23edf1761. --- Core/src/main/java/com/plotsquared/core/command/Auto.java | 8 -------- .../src/main/java/com/plotsquared/core/command/Merge.java | 2 +- 2 files changed, 1 insertion(+), 9 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 8c428c56e..60ed4bfea 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Auto.java +++ b/Core/src/main/java/com/plotsquared/core/command/Auto.java @@ -142,14 +142,6 @@ public class Auto extends SubCommand { } } } - int maxMerge = Permissions.hasPermissionRange(player, Permission.PERMISSION_MERGE, Settings.Limit.MAX_PLOTS); - if (sizeX * sizeZ > maxMerge) { - player.sendMessage( - TranslatableCaption.of("permission.no_permission"), - Template.of("node", Permission.PERMISSION_MERGE + "." + (sizeX * sizeZ)) - ); - return false; - } return true; } diff --git a/Core/src/main/java/com/plotsquared/core/command/Merge.java b/Core/src/main/java/com/plotsquared/core/command/Merge.java index d548e95a3..8c9976197 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Merge.java +++ b/Core/src/main/java/com/plotsquared/core/command/Merge.java @@ -124,7 +124,7 @@ public class Merge extends SubCommand { return false; } final int size = plot.getConnectedPlots().size(); - int max = Permissions.hasPermissionRange(player, Permission.PERMISSION_MERGE, Settings.Limit.MAX_PLOTS); + int max = Permissions.hasPermissionRange(player, "plots.merge", Settings.Limit.MAX_PLOTS); PlotMergeEvent event = this.eventDispatcher.callMerge(plot, direction, max, player); if (event.getEventResult() == Result.DENY) {