Add and Trust permission now count correctly (#3290)

This commit is contained in:
Xaver106 2021-10-15 12:28:23 +02:00 committed by GitHub
parent a6a0e1d12f
commit 4e391136c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ public class Add extends Command {
checkTrue(!uuids.isEmpty(), null);
int localAddSize = plot.getMembers().size();
int maxAddSize = Permissions.hasPermissionRange(player, Permission.PERMISSION_ADD, Settings.Limit.MAX_PLOTS);
if (localAddSize > maxAddSize) {
if (localAddSize >= maxAddSize) {
player.sendMessage(
TranslatableCaption.of("members.plot_max_members_added"),
Template.of("amount", String.valueOf(localAddSize))

View File

@ -94,7 +94,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)) {
if (size >= maxDenySize) {
player.sendMessage(
TranslatableCaption.of("members.plot_max_members_denied"),
Template.of("amount", String.valueOf(size))

View File

@ -138,7 +138,7 @@ public class Trust extends Command {
checkTrue(!uuids.isEmpty(), null);
int localTrustSize = currentPlot.getTrusted().size();
int maxTrustSize = Permissions.hasPermissionRange(player, Permission.PERMISSION_TRUST, Settings.Limit.MAX_PLOTS);
if (localTrustSize > maxTrustSize) {
if (localTrustSize >= maxTrustSize) {
player.sendMessage(
TranslatableCaption.of("members.plot_max_members_trusted"),
Template.of("amount", String.valueOf(localTrustSize))