diff --git a/Spigot-Server-Patches/Add-getEntity-by-UUID-API.patch b/Spigot-Server-Patches/Add-getEntity-by-UUID-API.patch index 59a588c444..78240cdbe8 100644 --- a/Spigot-Server-Patches/Add-getEntity-by-UUID-API.patch +++ b/Spigot-Server-Patches/Add-getEntity-by-UUID-API.patch @@ -42,8 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import org.bukkit.craftbukkit.generator.CraftChunkData; import org.bukkit.craftbukkit.help.SimpleHelpMap; @@ -0,0 +0,0 @@ public final class CraftServer implements Server { - ((SimplePluginManager) pluginManager).clearPermissions(); - loadCustomPermissions(); + }); + } } + + @Override diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch index baa7b6f608..db2b994f13 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Custom-Permissions.patch @@ -19,6 +19,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void reloadPermissions() { + ((SimplePluginManager) pluginManager).clearPermissions(); + 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 }