13
0
geforkt von Mirrors/Paper

Allow Reloading of Custom Permissions

https://github.com/PaperMC/Paper/issues/49
Dieser Commit ist enthalten in:
William 2016-03-18 03:30:17 -04:00
Ursprung 8a67ae1780
Commit acfd9a39a0

Datei anzeigen

@ -2818,5 +2818,23 @@ public final class CraftServer implements Server {
}
return this.adventure$audiences;
}
@Override
public void reloadPermissions() {
pluginManager.clearPermissions();
if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) loadCustomPermissions();
for (Plugin plugin : pluginManager.getPlugins()) {
for (Permission perm : plugin.getDescription().getPermissions()) {
try {
pluginManager.addPermission(perm);
} catch (IllegalArgumentException ex) {
getLogger().log(Level.WARNING, "Plugin " + plugin.getDescription().getFullName() + " tried to register permission '" + perm.getName() + "' but it's already registered", ex);
}
}
}
if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) loadCustomPermissions();
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}
// Paper end
}