Only fire WorldSaveEvent on full chunk saves (Fixes #2161)

This commit is contained in:
Shane Freeder 2019-06-10 21:45:17 +01:00
parent 1cf86b8970
commit 0616199cad

View file

@ -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) {