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 25ce7a83f1.
This commit is contained in:
Alexander Brandes 2022-11-20 10:58:04 +01:00 committed by GitHub
parent c1543f034c
commit c973ee8649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -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; return true;
} }

View File

@ -124,7 +124,7 @@ public class Merge extends SubCommand {
return false; return false;
} }
final int size = plot.getConnectedPlots().size(); 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 = PlotMergeEvent event =
this.eventDispatcher.callMerge(plot, direction, max, player); this.eventDispatcher.callMerge(plot, direction, max, player);
if (event.getEventResult() == Result.DENY) { if (event.getEventResult() == Result.DENY) {