mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 06:20:29 +08:00
dafc3dbcd5
--- work/Bukkit Submodule work/Bukkit aba2aaaf..949124e0: > SPIGOT-5121: Method to set PierceLevel of arrows --- work/CraftBukkit Submodule work/CraftBukkit c6997924..bf329334: > SPIGOT-5133: Throwing items into secondary end world portal causes crash > SPIGOT-5121: Method to set PierceLevel of arrows > SPIGOT-5122: Skip world#notify if sign has no world. > SPIGOT-5105: The EntityTag nbt tag disappears from preset armor_stand items. > SPIGOT-5106: Config option to prevent plugins with incompatible API's from loading --- work/Spigot Submodule work/Spigot 595711b0..935adb34: > SPIGOT-5088: Additional growth modifiers
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From 6b1faf392fb44f66c817d3ca0d583ae0dae98020 Mon Sep 17 00:00:00 2001
|
|
From: William <admin@domnian.com>
|
|
Date: Fri, 18 Mar 2016 03:30:17 -0400
|
|
Subject: [PATCH] Allow Reloading of Custom Permissions
|
|
|
|
https://github.com/PaperMC/Paper/issues/49
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 7b43683f8..a15293daf 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2045,5 +2045,23 @@ public final class CraftServer implements Server {
|
|
return null;
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void reloadPermissions() {
|
|
+ pluginManager.clearPermissions();
|
|
+ if (com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) 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 (!com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions();
|
|
+ DefaultPermissions.registerCorePermissions();
|
|
+ CraftDefaultPermissions.registerCorePermissions();
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.22.0
|
|
|