aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2023-05-27 20:14:04 +0200
committerNassim Jahnke <[email protected]>2023-05-27 20:14:04 +0200
commit90a0835f43f23aeddf5e2013b3f25d5e4490c8f8 (patch)
tree445cfed9e13cc079b378c3031f3856a41500ecfc
parentbcd8dc2c1189293c4fc0b57048f0f0668c1b7e60 (diff)
downloadPaper-90a0835f43f23aeddf5e2013b3f25d5e4490c8f8.tar.gz
Paper-90a0835f43f23aeddf5e2013b3f25d5e4490c8f8.zip
Fix incremental player saving patch
-rw-r--r--patches/server/0432-incremental-chunk-and-player-saving.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0432-incremental-chunk-and-player-saving.patch b/patches/server/0432-incremental-chunk-and-player-saving.patch
index 0218577c02..f7c986b53a 100644
--- a/patches/server/0432-incremental-chunk-and-player-saving.patch
+++ b/patches/server/0432-incremental-chunk-and-player-saving.patch
@@ -127,7 +127,7 @@ index 2c052d0a8c6d58ad8eae41c22c753327342e90f1..5b6ecebcb4585877a2761eb17f481004
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
public ServerGamePacketListenerImpl connection;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0e2a84148e721a8f799f0746e379c16a5f7f0dd3..44ead3a9831d913f7337a447b73a94e06fb0f06a 100644
+index 0e2a84148e721a8f799f0746e379c16a5f7f0dd3..9fefab398072721e3b0aebea0146d82f9046c203 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -528,6 +528,7 @@ public abstract class PlayerList {
@@ -156,7 +156,7 @@ index 0e2a84148e721a8f799f0746e379c16a5f7f0dd3..44ead3a9831d913f7337a447b73a94e0
+ ServerPlayer entityplayer = this.players.get(i);
+ if (interval == -1 || now - entityplayer.lastSave >= interval) {
+ this.save(entityplayer);
-+ if (interval != -1 && ++numSaved <= io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.maxPerTick()) { break; }
++ if (interval != -1 && io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.maxPerTick() != -1 && ++numSaved >= io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.maxPerTick()) { break; }
+ }
+ // Paper end
}