mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 12:16:44 +01:00
Add and Trust permission now count correctly (#3290)
This commit is contained in:
parent
a6a0e1d12f
commit
4e391136c0
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user