From 792d89ea43bea684828fa23d0146dc1e121c5111 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 29 May 2024 14:20:38 -0700 Subject: [PATCH] fix /reload issue --- .../1051-Fix-CommandRegisteredEvent-not-called.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/patches/server/1051-Fix-CommandRegisteredEvent-not-called.patch b/patches/server/1051-Fix-CommandRegisteredEvent-not-called.patch index cbba4b0daa..28052e31bb 100644 --- a/patches/server/1051-Fix-CommandRegisteredEvent-not-called.patch +++ b/patches/server/1051-Fix-CommandRegisteredEvent-not-called.patch @@ -204,7 +204,7 @@ index 10a113b057b0a4d27cce3bae975e1108aaa7b517..5d2d2bf7e170a4546d687f10305d28eb public Command getBukkitCommand() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 94a31c8f903eb61eb6d203e8e6fe8fb0beca28b1..d0adb649af02a38cf9c1738d5513ef89eebded73 100644 +index 94a31c8f903eb61eb6d203e8e6fe8fb0beca28b1..b50a8b7000b707a5ff48cc670300f60dd46ef994 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -584,6 +584,7 @@ public final class CraftServer implements Server { @@ -215,3 +215,11 @@ index 94a31c8f903eb61eb6d203e8e6fe8fb0beca28b1..d0adb649af02a38cf9c1738d5513ef89 } private void enablePlugin(Plugin plugin) { +@@ -1089,6 +1090,7 @@ public final class CraftServer implements Server { + if (console.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread(worker.getThread(), "still running"); // Paper - Debugging + } + io.papermc.paper.plugin.PluginInitializerManager.reload(this.console); // Paper ++ io.papermc.paper.command.brigadier.bukkit.BukkitBrigForwardingMap.INSTANCE.synced = false; // Paper - CommandRegisteredEvent + this.loadPlugins(); + this.enablePlugins(PluginLoadOrder.STARTUP); + this.enablePlugins(PluginLoadOrder.POSTWORLD);