diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-04-15 13:24:38 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-04-15 13:24:38 -0500 |
commit | 2e646d2809b3d6c94234cf78de328b7659c0223d (patch) | |
tree | 14d316888d3f18bd9562a9765b7e4d1b5d58da0d /src/main/java/org/bukkit | |
parent | 748ebae550002da7a0a6a611fcc737f57495f289 (diff) | |
download | craftbukkit-2e646d2809b3d6c94234cf78de328b7659c0223d.tar craftbukkit-2e646d2809b3d6c94234cf78de328b7659c0223d.tar.gz craftbukkit-2e646d2809b3d6c94234cf78de328b7659c0223d.tar.lz craftbukkit-2e646d2809b3d6c94234cf78de328b7659c0223d.tar.xz craftbukkit-2e646d2809b3d6c94234cf78de328b7659c0223d.zip |
Made permissions.yml registration easier; Addresses BUKKIT-1499
The permissions.yml now behaves similar to a plugin.yml
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 8e6bdd41..170e0911 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -579,13 +579,13 @@ public final class CraftServer implements Server { return; } - Set<String> keys = perms.keySet(); + List<Permission> permsList = Permission.loadPermissions(perms, "Permission node '%s' in " + file + " is invalid", Permission.DEFAULT_PERMISSION); - for (String name : keys) { + for (Permission perm : permsList) { try { - pluginManager.addPermission(Permission.loadPermission(name, perms.get(name))); - } catch (Throwable ex) { - Bukkit.getServer().getLogger().log(Level.SEVERE, "Permission node '" + name + "' in server config is invalid", ex); + pluginManager.addPermission(perm); + } catch (IllegalArgumentException ex) { + getLogger().log(Level.SEVERE, "Permission in " + file + " was already defined", ex); } } } |