summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-11-03 20:42:34 +0000
committerElgarL <ElgarL@palmergames.com>2011-11-03 20:42:34 +0000
commit5560ab42940a50178a4588937f3b5cae7874e37f (patch)
tree7c197841f90423cc8bca488d94bad9675341f0bc
parent87ccd7bf46ad4b8131591230d343552accf488ba (diff)
downloadEssentials-5560ab42940a50178a4588937f3b5cae7874e37f.tar
Essentials-5560ab42940a50178a4588937f3b5cae7874e37f.tar.gz
Essentials-5560ab42940a50178a4588937f3b5cae7874e37f.tar.lz
Essentials-5560ab42940a50178a4588937f3b5cae7874e37f.tar.xz
Essentials-5560ab42940a50178a4588937f3b5cae7874e37f.zip
Fix for an error in checkFullUserPermission caused by players
disconnecting mid perms update.
-rw-r--r--EssentialsGroupManager/src/Changelog.txt2
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index a8e7a772a..5262c7018 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -69,4 +69,4 @@ v 1.5:
If the files have been altered (on disc) it will reload, so long as the in-memory data hasn't changed.
If the files on Disc have changed AND there have been changes to it's in-memory data it will show a warning.
You then MUST issue a '/mansave force' to overwrite the disc files, or a '/manload' to overwrite the memory data.
- - Fix for an error in checkFullUserPermission caused by silly requests for a null perm. \ No newline at end of file
+ - Fix for an error in checkFullUserPermission caused by players disconnecting mid perms update. \ No newline at end of file
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;