Fix incremental player saving patch

This commit is contained in:
Nassim Jahnke 2023-05-27 20:14:04 +02:00
parent d6e9b7fd8d
commit 89aecf16ad

View file

@ -156,7 +156,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ ServerPlayer entityplayer = 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); + 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 + // Paper end
} }