From 0616199cad1e87174aa3c686674d603cd0ce411a Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 10 Jun 2019 21:45:17 +0100 Subject: [PATCH] Only fire WorldSaveEvent on full chunk saves (Fixes #2161) --- Spigot-Server-Patches/incremental-chunk-saving.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/incremental-chunk-saving.patch b/Spigot-Server-Patches/incremental-chunk-saving.patch index b03039c645..6fd22fee5d 100644 --- a/Spigot-Server-Patches/incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/incremental-chunk-saving.patch @@ -124,12 +124,15 @@ index c091007d8c..67aa9325b6 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 92aad060ef..c650f40b0d 100644 +index 92aad060ef..1c3815a9c4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { + ChunkProviderServer chunkproviderserver = this.getChunkProvider(); + if (!flag1) { - org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit +- org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit ++ if (flag || server.serverAutoSave) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper - full saves only try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper + if (flag || server.serverAutoSave) { // Paper if (iprogressupdate != null) {