Fix bypass perms. Fixes #443

I had a typo and didn't add the parent perms :(

Sorry about this big breakage... should be fixed.
This commit is contained in:
Eric Stokes 2012-02-04 18:06:50 -07:00
parent b66028e0e0
commit a9c6582487
2 changed files with 6 additions and 2 deletions

View File

@ -206,7 +206,11 @@ public class MVWorld implements MultiverseWorld {
this.plugin.getServer().getPluginManager().addPermission(this.permission);
this.plugin.getServer().getPluginManager().addPermission(this.exempt);
this.plugin.getServer().getPluginManager().addPermission(this.ignoreperm);
addToUpperLists(this.permission);
// Add the permission and exempt to parents.
this.addToUpperLists(this.permission);
// Add ignore to it's parent:
this.ignoreperm.addParent("mv.bypass.gamemode.*", true);
} catch (IllegalArgumentException e) {
this.plugin.log(Level.FINER, "Permissions nodes were already added for " + this.name);
}

View File

@ -524,7 +524,7 @@ public class WorldManager implements MVWorldManager {
this.plugin.getServer().getPluginManager().removePermission(w.getAccessPermission().getName());
this.plugin.getServer().getPluginManager().removePermission(w.getExemptPermission().getName());
// Special namespace for gamemodes
this.plugin.getServer().getPluginManager().removePermission("mv.gamemode.bypass." + w.getName());
this.plugin.getServer().getPluginManager().removePermission("mv.bypass.gamemode." + w.getName());
}
// Recalc the all permission
this.plugin.getServer().getPluginManager().recalculatePermissionDefaults(allAccess);