2025-03-26 03:05:00 +11:00
|
|
|
From 245b9b61a13d17e889dc9184241e93c583c408ef Mon Sep 17 00:00:00 2001
|
2020-11-07 18:24:16 +11:00
|
|
|
From: Sander Knauff <sanderknauff@hotmail.com>
|
|
|
|
Date: Sat, 7 Nov 2020 18:23:42 +1100
|
|
|
|
Subject: [PATCH] Allow Disabling Player Data Saving
|
|
|
|
|
|
|
|
|
2021-03-16 09:00:00 +11:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
|
2024-12-04 03:20:00 +11:00
|
|
|
index c79f0fbd9..274fdb364 100644
|
2021-03-16 09:00:00 +11:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java
|
2023-12-06 03:40:00 +11:00
|
|
|
@@ -35,6 +35,7 @@ public class WorldNBTStorage {
|
2020-11-07 18:24:16 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
public void save(EntityHuman entityhuman) {
|
|
|
|
+ if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot
|
|
|
|
try {
|
2021-11-22 09:00:00 +11:00
|
|
|
NBTTagCompound nbttagcompound = entityhuman.saveWithoutId(new NBTTagCompound());
|
2023-12-06 03:40:00 +11:00
|
|
|
Path path = this.playerDir.toPath();
|
2020-11-07 18:24:16 +11:00
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2024-12-04 03:20:00 +11:00
|
|
|
index 6502572f5..5e7ec9919 100644
|
2020-11-07 18:24:16 +11:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2024-07-16 20:30:27 +10:00
|
|
|
@@ -396,4 +396,9 @@ public class SpigotConfig
|
2020-11-07 18:24:16 +11:00
|
|
|
logVillagerDeaths = getBoolean("settings.log-villager-deaths", true);
|
2021-08-07 16:35:21 +10:00
|
|
|
logNamedDeaths = getBoolean("settings.log-named-deaths", true);
|
2020-11-07 18:24:16 +11:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static boolean disablePlayerDataSaving;
|
|
|
|
+ private static void disablePlayerDataSaving() {
|
|
|
|
+ disablePlayerDataSaving = getBoolean("players.disable-saving", false);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2025-03-26 03:05:00 +11:00
|
|
|
2.49.0
|
2020-11-07 18:24:16 +11:00
|
|
|
|