From 05a8914e8cbe77938a30a8727a9af68b1782cbb5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 16 Jul 2017 20:41:30 -0400 Subject: [PATCH] SPIGOT-3427: Recalculate ConsoleSender permissions after plugins have loaded Resolves a really weird race condition where the console sender could lose permission to execute commands defined in plugin.yml with default=op --- ...lculate-ConsoleSender-permissions-af.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Spigot-Server-Patches/0223-SPIGOT-3427-Recalculate-ConsoleSender-permissions-af.patch diff --git a/Spigot-Server-Patches/0223-SPIGOT-3427-Recalculate-ConsoleSender-permissions-af.patch b/Spigot-Server-Patches/0223-SPIGOT-3427-Recalculate-ConsoleSender-permissions-af.patch new file mode 100644 index 0000000000..39d11ca744 --- /dev/null +++ b/Spigot-Server-Patches/0223-SPIGOT-3427-Recalculate-ConsoleSender-permissions-af.patch @@ -0,0 +1,24 @@ +From d8dda221feb33c9e75c7c86414597aa36c577471 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 16 Jul 2017 20:40:26 -0400 +Subject: [PATCH] SPIGOT-3427: Recalculate ConsoleSender permissions after + plugins have loaded + +Resolves a really weird race condition where the console sender could lose permission to execute +commands defined in plugin.yml with default=op + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 9ef2e4a55..938602af1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -340,6 +340,7 @@ public final class CraftServer implements Server { + if (!com.destroystokyo.paper.PaperConfig.loadPermsBeforePlugins) loadCustomPermissions(); // Paper + DefaultPermissions.registerCorePermissions(); + CraftDefaultPermissions.registerCorePermissions(); ++ getConsoleSender().recalculatePermissions(); // Paper - SPIGOT-3427 + helpMap.initializeCommands(); + } + } +-- +2.13.0 +