summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
index 3546c757e..e8911b4a8 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java
@@ -658,7 +658,7 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
if (result.resultType.equals(PermissionCheckResult.Type.EXCEPTION) || result.resultType.equals(PermissionCheckResult.Type.FOUND)) {
return true;
}
- if (Bukkit.getPlayer(user.getName()).hasPermission(permission))
+ if ((Bukkit.getPlayer(user.getName()) != null) && (Bukkit.getPlayer(user.getName()).hasPermission(permission)))
return true;
return false;
@@ -700,7 +700,7 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
}
}
- if (Bukkit.getPlayer(user.getName()).hasPermission(targetPermission)) {
+ if ((Bukkit.getPlayer(user.getName()) != null) && (Bukkit.getPlayer(user.getName()).hasPermission(targetPermission))) {
result.resultType = PermissionCheckResult.Type.FOUND;
result.owner = user;
return result;