2025-06-18 01:15:00 +10:00
|
|
|
From a44ee2ed9663726b0d866f371d16ce7f1339c7c1 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
|
2025-06-18 01:15:00 +10:00
|
|
|
index cc88c7784..12dbf9541 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
|
2025-06-18 01:15:00 +10:00
|
|
|
@@ -40,6 +40,7 @@ public class WorldNBTStorage {
|
2020-11-07 18:24:16 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
public void save(EntityHuman entityhuman) {
|
|
|
|
+ if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot
|
2025-06-18 01:15:00 +10:00
|
|
|
try (ProblemReporter.j problemreporter_j = new ProblemReporter.j(entityhuman.problemPath(), WorldNBTStorage.LOGGER)) {
|
|
|
|
TagValueOutput tagvalueoutput = TagValueOutput.createWithContext(problemreporter_j, entityhuman.registryAccess());
|
|
|
|
|
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
|
|
|
|