3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 07:10:10 +01:00

Made permissions.yml registration easier; Addresses BUKKIT-1499

The permissions.yml now behaves similar to a plugin.yml
Dieser Commit ist enthalten in:
Wesley Wolfe 2012-04-15 13:24:38 -05:00
Ursprung 748ebae550
Commit 2e646d2809

Datei anzeigen

@ -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);
}
}
}