diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-01-17 23:50:05 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-01-17 23:50:05 +0000 |
commit | 7f633a110d74a81bc18f63047bfb8fb768d20d28 (patch) | |
tree | c19ad1c6cd2b2235ecbf4a7380a8c9b19f731bfd /EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | |
parent | 8096291cfa71d4e0e12c96b6c1d603e2ceadfce3 (diff) | |
parent | 6676461f656f7a69ff973869aa7a26388e10178e (diff) | |
download | Essentials-7f633a110d74a81bc18f63047bfb8fb768d20d28.tar Essentials-7f633a110d74a81bc18f63047bfb8fb768d20d28.tar.gz Essentials-7f633a110d74a81bc18f63047bfb8fb768d20d28.tar.lz Essentials-7f633a110d74a81bc18f63047bfb8fb768d20d28.tar.xz Essentials-7f633a110d74a81bc18f63047bfb8fb768d20d28.zip |
Merge remote branch 'remotes/origin/groupmanager'
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index ebaadf8bd..91f9a9bd6 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -79,7 +79,7 @@ public class BukkitPermissions { public BukkitPermissions(GroupManager plugin) {
this.plugin = plugin;
- //this.collectPermissions();
+ this.collectPermissions();
this.registerEvents();
this.updateAllPlayers();
@@ -105,15 +105,20 @@ public class BukkitPermissions { manager.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, plugin);
}
- /*
+
public void collectPermissions() {
registeredPermissions.clear();
+ /*
for (Plugin bukkitPlugin : Bukkit.getServer().getPluginManager().getPlugins()) {
for (Permission permission : bukkitPlugin.getDescription().getPermissions())
registeredPermissions.push(permission);
}
+ */
+
+ registeredPermissions = new LinkedList<Permission>(Bukkit.getPluginManager().getPermissions());
+
}
- */
+
public void updatePermissions(Player player) {
this.updatePermissions(player, null);
@@ -194,7 +199,7 @@ public class BukkitPermissions { // Add all permissions for this player (GM only)
// child nodes will be calculated by Bukkit.
- List<String> playerPermArray = worldData.getPermissionsHandler().getAllPlayersPermissions(player.getName());
+ List<String> playerPermArray = worldData.getPermissionsHandler().getAllPlayersPermissions(player.getName(), false);
Map<String, Boolean> newPerms = new HashMap<String, Boolean>();
for (String permission : playerPermArray) {
@@ -210,6 +215,7 @@ public class BukkitPermissions { */
newPerms.put(permission, value);
}
+
//player.recalculatePermissions();
/**
@@ -373,13 +379,13 @@ public class BukkitPermissions { if (!GroupManager.isLoaded())
return;
- //collectPermissions();
+ collectPermissions();
updateAllPlayers();
}
@Override
public void onPluginDisable(PluginDisableEvent event) {
- // collectPermissions();
+ collectPermissions();
// updateAllPlayers();
}
}
|