From 96ee1fb8fb3cc756f8c92acabb21ca4c61f87e32 Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Sat, 15 May 2021 21:51:19 -0700 Subject: [PATCH] fix WorldSaveEvent not firing with /save-all (#5650) --- .../0361-incremental-chunk-saving.patch | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Spigot-Server-Patches/0361-incremental-chunk-saving.patch b/Spigot-Server-Patches/0361-incremental-chunk-saving.patch index 7f069ae993..bca0562141 100644 --- a/Spigot-Server-Patches/0361-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0361-incremental-chunk-saving.patch @@ -252,10 +252,10 @@ index ed454f8dff7b0d94d4bde914a6f26bb019e82296..ca05fe4ed0773b94035c63f8f8db6c03 return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); }); diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index d308197995a92f5be8f5b928fa9ae83dd659545c..d7fe6f00b352dad9e9f579f9af86cb8b90ef83ae 100644 +index d308197995a92f5be8f5b928fa9ae83dd659545c..12e34e1514f060ffef96cdd3ac57d0495dd37321 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -888,11 +888,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -888,6 +888,38 @@ public class WorldServer extends World implements GeneratorAccessSeed { return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); } @@ -294,12 +294,6 @@ index d308197995a92f5be8f5b928fa9ae83dd659545c..d7fe6f00b352dad9e9f579f9af86cb8b public void save(@Nullable IProgressUpdate iprogressupdate, boolean flag, boolean flag1) { ChunkProviderServer chunkproviderserver = this.getChunkProvider(); - if (!flag1) { -- org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit -+ if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper - try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper - if (iprogressupdate != null) { - iprogressupdate.a(new ChatMessage("menu.savingLevel")); @@ -918,6 +950,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end }