diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-11-25 16:01:46 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-11-25 16:01:46 +0000 |
commit | b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f (patch) | |
tree | ee32ec24de4e4315f0caa1e8cb2e0020b69718ae /EssentialsGroupManager | |
parent | 24a60734885deb8128a9640d26e49e173b065a56 (diff) | |
download | Essentials-b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f.tar Essentials-b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f.tar.gz Essentials-b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f.tar.lz Essentials-b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f.tar.xz Essentials-b41c3709bae6b1ad6f2b6ce9e5494421168c8f5f.zip |
Raised bukkit perms priority
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java index acfc65232..91c73b5c2 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java @@ -669,7 +669,7 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { * @return true if permission was found. false if not, or was negated. */ public boolean checkUserPermission(User user, String permission) { - PermissionCheckResult result = checkFullUserPermission(user, permission); + PermissionCheckResult result = checkFullGMPermission(user, permission, true); if (result.resultType.equals(PermissionCheckResult.Type.EXCEPTION) || result.resultType.equals(PermissionCheckResult.Type.FOUND)) { return true; } @@ -708,6 +708,16 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { return result; } + if (checkBukkit == true) { + // Check Bukkit perms to support plugins which add perms via code (Heroes). + final Player player = Bukkit.getPlayer(user.getName()); + if ((player != null) && (player.hasPermission(targetPermission))) { + result.resultType = PermissionCheckResult.Type.FOUND; + result.owner = user; + return result; + } + } + PermissionCheckResult resultUser = checkUserOnlyPermission(user, targetPermission); if (!resultUser.resultType.equals(PermissionCheckResult.Type.NOTFOUND)) { return resultUser; @@ -727,16 +737,6 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { } } - if (checkBukkit == true) { - // Check Bukkit perms to support plugins which add perms via code (Heroes). - final Player player = Bukkit.getPlayer(user.getName()); - if ((player != null) && (player.hasPermission(targetPermission))) { - result.resultType = PermissionCheckResult.Type.FOUND; - result.owner = user; - return result; - } - } - // THEN IT RETURNS A NOT FOUND return result; } |