From caec3ad3b2521ab7b4850e48cb7576d5a742b90a Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 25 Nov 2021 12:49:24 +0100 Subject: [PATCH] Fix incremental player saving check --- patches/server/Incremental-player-saving.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Incremental-player-saving.patch b/patches/server/Incremental-player-saving.patch index 5540f59735..c96e60b017 100644 --- a/patches/server/Incremental-player-saving.patch +++ b/patches/server/Incremental-player-saving.patch @@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 for (int i = 0; i < this.players.size(); ++i) { - this.save(this.players.get(i)); + ServerPlayer entityplayer = this.players.get(i); -+ if (interval != -1 || now - entityplayer.lastSave >= interval) { ++ if (interval == -1 || now - entityplayer.lastSave >= interval) { + this.save(entityplayer); + if (interval != -1 && ++numSaved <= com.destroystokyo.paper.PaperConfig.maxPlayerAutoSavePerTick) { break; } + }