mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
39 lines
2 KiB
Diff
39 lines
2 KiB
Diff
From 198909d1bf40f6a46c179c03261f925a7cbb8e0d Mon Sep 17 00:00:00 2001
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
Date: Mon, 26 Mar 2018 18:30:53 +0300
|
|
Subject: [PATCH] Make player data saving configurable
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index 5884b04f7e..ba341e0174 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -270,4 +270,13 @@ public class PaperConfig {
|
|
private static void authenticationServersDownKickMessage() {
|
|
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
|
}
|
|
+
|
|
+ public static boolean savePlayerData = true;
|
|
+ private static void savePlayerData() {
|
|
+ savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
|
+ if(!savePlayerData) {
|
|
+ Bukkit.getLogger().log(Level.WARNING, "Player Data Saving is currently disabled. Any changes to your players data, " +
|
|
+ "such as inventories, experience points, advancements and the like will not be saved when they log out.");
|
|
+ }
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
index a0254d8e51..e60e10c57d 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
@@ -138,6 +138,7 @@ public class WorldNBTStorage implements IPlayerFileData {
|
|
|
|
@Override
|
|
public void save(EntityHuman entityhuman) {
|
|
+ if(!com.destroystokyo.paper.PaperConfig.savePlayerData) return; // Paper - Make player data saving configurable
|
|
try {
|
|
NBTTagCompound nbttagcompound = entityhuman.save(new NBTTagCompound());
|
|
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat.tmp");
|
|
--
|
|
2.25.1
|
|
|