2020-11-09 01:09:37 +01:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
|
|
|
|
2020-11-09 02:05:27 +01:00
|
|
|
Upstream has added a patch which negates the need for this patch,
|
|
|
|
however, we should still migrate our configuration back upstream,
|
|
|
|
to prevent unexpected situations
|
2020-11-09 01:09:37 +01:00
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2020-11-18 04:45:18 +01:00
|
|
|
index 98686b6d660f14ea812b50fad423e513424983c2..1b845eb88c0cb7ae5797c8c6f6acc2178afb09d1 100644
|
2020-11-09 01:09:37 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
|
|
@@ -271,4 +271,13 @@ public class PaperConfig {
|
|
|
|
private static void authenticationServersDownKickMessage() {
|
|
|
|
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ private static void savePlayerData() {
|
2020-11-09 02:05:27 +01:00
|
|
|
+ Object val = config.get("settings.save-player-data");
|
|
|
|
+ if (val instanceof Boolean) {
|
|
|
|
+ SpigotConfig.disablePlayerDataSaving = !(Boolean) val;
|
|
|
|
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
|
|
|
|
+ SpigotConfig.save();
|
2020-11-09 01:09:37 +01:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
}
|