13
0
geforkt von Mirrors/Paper

Fix incremental player saving check

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-11-25 12:49:24 +01:00
Ursprung 8d02622173
Commit caec3ad3b2

Datei anzeigen

@ -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; }
+ }