Archiviert
13
0

fix WorldSaveEvent not firing with /save-all (#5650)

Dieser Commit ist enthalten in:
Jake Potrebic 2021-05-15 21:51:19 -07:00 committet von GitHub
Ursprung e90e7829ee
Commit 96ee1fb8fb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -252,10 +252,10 @@ index ed454f8dff7b0d94d4bde914a6f26bb019e82296..ca05fe4ed0773b94035c63f8f8db6c03
return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); 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 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 --- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/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); 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) { public void save(@Nullable IProgressUpdate iprogressupdate, boolean flag, boolean flag1) {
ChunkProviderServer chunkproviderserver = this.getChunkProvider(); 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 { @@ -918,6 +950,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end // CraftBukkit end
} }