diff options
author | Riley Park <[email protected]> | 2021-02-21 11:45:33 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-21 20:45:33 +0100 |
commit | 4e958e229f9f448a10dbc610bab460dbf222902e (patch) | |
tree | b5029407506e181c4800c42920b7e01a78d06639 /Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch | |
parent | 1a973561167fe7eee67fb1590a7590f8d7166f2a (diff) | |
download | Paper-4e958e229f9f448a10dbc610bab460dbf222902e.tar.gz Paper-4e958e229f9f448a10dbc610bab460dbf222902e.zip |
We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: zml <[email protected]>
Co-authored-by: Mariell Hoversholm <[email protected]>
Diffstat (limited to 'Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch')
-rw-r--r-- | Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch new file mode 100644 index 0000000000..ef359867f7 --- /dev/null +++ b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William <[email protected]> +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 499e2da0c9085cfffdb882df9801d654f4804d7f..5bbf334d9621822ffc0e731c6dbd26644a5e80d7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -2243,5 +2243,23 @@ public final class CraftServer implements Server { + } + return this.adventure$audiences; + } ++ ++ @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 + } |