summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src')
-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;
}