3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

Fix incremental player saving patch

Dieser Commit ist enthalten in:
Nassim Jahnke 2023-05-27 20:14:04 +02:00
Ursprung bcd8dc2c11
Commit 90a0835f43
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

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