2021-06-11 14:02:28 +02: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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2021-07-25 09:10:30 +02:00
|
|
|
index ceeb011f2ae496f39a391316cb3773fdef52ee11..49eff2eeb06ca104c379cfa0fdb393fe9c9ff956 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2021-07-25 09:10:30 +02:00
|
|
|
@@ -284,4 +284,13 @@ public class PaperConfig {
|
2021-06-11 14:02:28 +02:00
|
|
|
private static void authenticationServersDownKickMessage() {
|
|
|
|
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ private static void savePlayerData() {
|
|
|
|
+ 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();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
}
|