geforkt von Mirrors/Paper
Also Reload Plugin Defined Permissions
Closes https://github.com/PaperMC/Paper/issues/210
Dieser Commit ist enthalten in:
Ursprung
2197b74f38
Commit
9762849407
@ -42,8 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
import org.bukkit.craftbukkit.generator.CraftChunkData;
|
import org.bukkit.craftbukkit.generator.CraftChunkData;
|
||||||
import org.bukkit.craftbukkit.help.SimpleHelpMap;
|
import org.bukkit.craftbukkit.help.SimpleHelpMap;
|
||||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||||
((SimplePluginManager) pluginManager).clearPermissions();
|
});
|
||||||
loadCustomPermissions();
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -19,6 +19,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ public void reloadPermissions() {
|
+ public void reloadPermissions() {
|
||||||
+ ((SimplePluginManager) pluginManager).clearPermissions();
|
+ ((SimplePluginManager) pluginManager).clearPermissions();
|
||||||
+ loadCustomPermissions();
|
+ loadCustomPermissions();
|
||||||
|
+ for (Plugin plugin : pluginManager.getPlugins()) {
|
||||||
|
+ plugin.getDescription().getPermissions().forEach((perm) -> {
|
||||||
|
+ 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);
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren