From c598daf3504c3d6cbd549680ddc6702ca7e7cec2 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 13 Aug 2017 19:40:59 +0200 Subject: [PATCH] Fix negating group permissions to cancel inheritance --- .../me/lucko/luckperms/common/model/PermissionHolder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java b/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java index a8b534c2..9aa612f7 100644 --- a/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java +++ b/common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java @@ -533,7 +533,7 @@ public abstract class PermissionHolder { if (!n.isGroupNode()) continue; String groupName = n.getGroupName(); - if (!processedGroups.add(groupName) || excludedGroups.contains(groupName)) continue; + if (!processedGroups.add(groupName) || excludedGroups.contains(groupName) || !n.getValue()) continue; if (!((contexts.isApplyGlobalGroups() || n.isServerSpecific()) && (contexts.isApplyGlobalWorldGroups() || n.isWorldSpecific()))) { continue; @@ -611,7 +611,7 @@ public abstract class PermissionHolder { if (!n.isGroupNode()) continue; String groupName = n.getGroupName(); - if (!processedGroups.add(groupName) || excludedGroups.contains(groupName)) continue; + if (!processedGroups.add(groupName) || excludedGroups.contains(groupName) || !n.getValue()) continue; Group g = plugin.getGroupManager().getIfLoaded(groupName); if (g != null) { @@ -759,7 +759,7 @@ public abstract class PermissionHolder { if (!n.isGroupNode()) continue; String groupName = n.getGroupName(); - if (!processedGroups.add(groupName) || excludedGroups.contains(groupName)) continue; + if (!processedGroups.add(groupName) || excludedGroups.contains(groupName) || !n.getValue()) continue; if (!((contexts.isApplyGlobalGroups() || n.isServerSpecific()) && (contexts.isApplyGlobalWorldGroups() || n.isWorldSpecific()))) { continue; @@ -819,7 +819,7 @@ public abstract class PermissionHolder { if (!n.isGroupNode()) continue; String groupName = n.getGroupName(); - if (!processedGroups.add(groupName) || excludedGroups.contains(groupName)) continue; + if (!processedGroups.add(groupName) || excludedGroups.contains(groupName) || !n.getValue()) continue; Group g = plugin.getGroupManager().getIfLoaded(groupName); if (g != null) {