mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix incremental player saving check
This commit is contained in:
parent
8d02622173
commit
caec3ad3b2
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
- this.save(this.players.get(i));
|
- this.save(this.players.get(i));
|
||||||
+ 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 <= com.destroystokyo.paper.PaperConfig.maxPlayerAutoSavePerTick) { break; }
|
+ if (interval != -1 && ++numSaved <= com.destroystokyo.paper.PaperConfig.maxPlayerAutoSavePerTick) { break; }
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue