summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-11-25 16:01:46 +0000
committerElgarL <ElgarL@palmergames.com>2011-11-25 16:01:46 +0000
commitb41c3709bae6b1ad6f2b6ce9e5494421168c8f5f (patch)
treeee32ec24de4e4315f0caa1e8cb2e0020b69718ae /EssentialsGroupManager
parent24a60734885deb8128a9640d26e49e173b065a56 (diff)
downloadEssentials-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.java22
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;
}