Disable completly PermissionsBukkit

This commit is contained in:
Michel Roux 2012-05-08 14:36:48 +02:00
parent 0b0847ea2c
commit 5a3e6c3f32

View File

@ -32,11 +32,12 @@ public class SimplyPlugin extends JavaPlugin {
// -- Basic stuff // -- Basic stuff
@Override @Override
public void onEnable() { public void onEnable() {
// Unregister existing PermissionsBukkit nodes // Disable PermissionsBukkit to avoid bugs
if (getServer().getPluginManager().isPluginEnabled("PermissionsBukkit")) { if (getServer().getPluginManager().isPluginEnabled("PermissionsBukkit")) {
for (Permission perm : getServer().getPluginManager().getPlugin("PermissionsBukkit").getDescription().getPermissions()) { for (Permission perm : getServer().getPluginManager().getPlugin("PermissionsBukkit").getDescription().getPermissions()) {
getServer().getPluginManager().removePermission(perm); getServer().getPluginManager().removePermission(perm);
} }
getServer().getPluginManager().disablePlugin(getServer().getPluginManager().getPlugin("PermissionsBukkit"));
} }
// Take care of configuration // Take care of configuration