diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch index 654eb8973c..4f06867090 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch @@ -11,7 +11,15 @@ import org.slf4j.Logger; public class PlayerDataStorage { -@@ -49,34 +51,55 @@ +@@ -33,6 +35,7 @@ + } + + public void save(Player player) { ++ if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot + try { + CompoundTag nbttagcompound = player.saveWithoutId(new CompoundTag()); + Path path = this.playerDir.toPath(); +@@ -49,34 +52,55 @@ } @@ -78,7 +86,7 @@ } } -@@ -84,20 +107,44 @@ +@@ -84,20 +108,44 @@ } public Optional load(Player player) { diff --git a/paper-server/src/main/java/org/spigotmc/SpigotConfig.java b/paper-server/src/main/java/org/spigotmc/SpigotConfig.java index 6b04e57eba..92adc987fd 100644 --- a/paper-server/src/main/java/org/spigotmc/SpigotConfig.java +++ b/paper-server/src/main/java/org/spigotmc/SpigotConfig.java @@ -396,4 +396,9 @@ public class SpigotConfig SpigotConfig.logVillagerDeaths = SpigotConfig.getBoolean("settings.log-villager-deaths", true); SpigotConfig.logNamedDeaths = SpigotConfig.getBoolean("settings.log-named-deaths", true); } + + public static boolean disablePlayerDataSaving; + private static void disablePlayerDataSaving() { + SpigotConfig.disablePlayerDataSaving = SpigotConfig.getBoolean("players.disable-saving", false); + } }