summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-10-01 11:22:19 +0100
committerElgarL <ElgarL@palmergames.com>2011-10-01 11:22:19 +0100
commit5cfb6007089061b2b204748d6d6fcac4f2b5d67e (patch)
treede4811a513d41a98dbf51c9d382421749825f5bd /EssentialsGroupManager
parente6d1617599efd9e10c306058a8816ba94ccaa23a (diff)
downloadEssentials-5cfb6007089061b2b204748d6d6fcac4f2b5d67e.tar
Essentials-5cfb6007089061b2b204748d6d6fcac4f2b5d67e.tar.gz
Essentials-5cfb6007089061b2b204748d6d6fcac4f2b5d67e.tar.lz
Essentials-5cfb6007089061b2b204748d6d6fcac4f2b5d67e.tar.xz
Essentials-5cfb6007089061b2b204748d6d6fcac4f2b5d67e.zip
Fixed an issue with superperms where plugins define perms with
inheritance after the root perms
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/Tasks/BukkitPermsUpdateTask.java1
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java6
3 files changed, 6 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 4f90b82cd..74752bca8 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -23,4 +23,5 @@ v 1.1:
- Fix for GM not checking inheritance for known superperms nodes.
- Optimized getAllPlayersPermissions and fixed pushing unknown perms to superperms.
v 1.2:
- - Changed priority if Registered events to lowest. \ No newline at end of file
+ - Changed priority of Registered events to lowest.
+ - Fixed an issue with superperms where plugins define perms with inheritance after the root perms \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/Tasks/BukkitPermsUpdateTask.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/Tasks/BukkitPermsUpdateTask.java
index 27951112d..f4b805c35 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/Tasks/BukkitPermsUpdateTask.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/Tasks/BukkitPermsUpdateTask.java
@@ -18,6 +18,7 @@ public class BukkitPermsUpdateTask implements Runnable {
public void run() {
// Signal loaded and update BukkitPermissions.
GroupManager.setLoaded(true);
+ GroupManager.BukkitPermissions.collectPermissions();
GroupManager.BukkitPermissions.updateAllPlayers();
GroupManager.logger.info("Bukkit Permissions Updated!");
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index 20f6331bc..b4035a1f5 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -93,7 +93,7 @@ public class BukkitPermissions {
manager.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, plugin);
}
- private void collectPermissions() {
+ public void collectPermissions() {
registeredPermissions.clear();
for (Plugin bukkitPlugin : Bukkit.getServer().getPluginManager().getPlugins()) {
for(Permission permission : bukkitPlugin.getDescription().getPermissions())
@@ -134,8 +134,8 @@ public class BukkitPermissions {
Boolean value;
for (Permission permission : registeredPermissions) {
value = worldData.getPermissionsHandler().checkUserPermission(user, permission.getName());
-
- attachment.setPermission(permission, value);
+ if (value == true)
+ attachment.setPermission(permission, value);
}
// Add any missing permissions for this player (non bukkit plugins)