Fix groups permission check off by 1

This commit is contained in:
Esophose 2018-12-02 18:13:27 -07:00
parent bbdff6aa9f
commit b9e8aa3028
2 changed files with 2 additions and 2 deletions

2
.gitignore vendored
View file

@ -50,4 +50,4 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
images/playerparticles_icon.png
images/

View file

@ -89,7 +89,7 @@ public class PermissionManager {
public static boolean hasPlayerReachedMaxGroups(PPlayer pplayer) {
if (PPermission.ALL.check(pplayer.getPlayer())) return false;
if (PPermission.GROUPS_UNLIMITED.check(pplayer.getPlayer())) return false;
return pplayer.getParticleGroups().size() >= PSetting.MAX_GROUPS.getInt();
return pplayer.getParticleGroups().size() - 1 >= PSetting.MAX_GROUPS.getInt();
}
/**