mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 08:56:23 +01:00
Only fire WorldSaveEvent on full chunk saves (Fixes #2161)
This commit is contained in:
parent
d578467027
commit
7a3054158d
1 changed files with 7 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 82e112148beccdfbb3079008b4e56ee029a17048 Mon Sep 17 00:00:00 2001
|
From dc428d98174bb94559ba18071948c71fb2bfcd9a Mon Sep 17 00:00:00 2001
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
||||||
Subject: [PATCH] incremental chunk saving
|
Subject: [PATCH] incremental chunk saving
|
||||||
|
@ -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
|
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
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -757,6 +757,7 @@ public class WorldServer extends World {
|
@@ -755,8 +755,9 @@ public class WorldServer extends World {
|
||||||
|
ChunkProviderServer chunkproviderserver = this.getChunkProvider();
|
||||||
|
|
||||||
if (!flag1) {
|
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
|
try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
|
||||||
+ if (flag || server.serverAutoSave) { // Paper
|
+ if (flag || server.serverAutoSave) { // Paper
|
||||||
if (iprogressupdate != null) {
|
if (iprogressupdate != null) {
|
||||||
|
|
Loading…
Reference in a new issue