diff options
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java index de42ce9c3..429a9553f 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java @@ -135,9 +135,13 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { } // Add all group permissions, unless negated by direct player perms. - for (String perm : groupPermArray) - if ((!playerPermArray.contains(perm)) && (!playerPermArray.contains("-" + perm))) + for (String perm : groupPermArray) { + // Perm doesn't already exists and there is no negation for it + // It's not a negated perm where a normal perm exists (don't allow inheritance to negate higher perms) + if ((!playerPermArray.contains(perm)) && (!playerPermArray.contains("-" + perm)) + && (!perm.startsWith("-") && (!playerPermArray.contains(perm.substring(1))))) playerPermArray.add(perm); + } } // Collections.sort(playerPermArray, |