diff --git a/patches/server/Bundle-spark.patch b/patches/server/Bundle-spark.patch index 08b8705859..1f7ece62fa 100644 --- a/patches/server/Bundle-spark.patch +++ b/patches/server/Bundle-spark.patch @@ -292,13 +292,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // Paper - reset invalid state for event fire below io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS, io.papermc.paper.command.brigadier.PaperCommands.INSTANCE, org.bukkit.plugin.Plugin.class, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL); // Paper - call commands event for regular plugins @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa - - MinecraftServer.LOGGER.info("Stopping server"); Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing -+ this.server.spark.disable(); // Paper - spark // CraftBukkit start if (this.server != null) { ++ this.server.spark.disable(); // Paper - spark this.server.disablePlugins(); + this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown + } @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa // tasks are default scheduled at -1 + delay, and first tick will tick at 1 final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time