mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 05:55:44 +01:00
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
|
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
|
||
|
index 52954fc3bf932cfc9d5ce63e3d3cace351305790..05a5abb951abe37f30a719cb75376d2d43c0d252 100644
|
||
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||
|
@@ -279,4 +279,13 @@ public class PaperConfig {
|
||
|
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();
|
||
|
+ }
|
||
|
+ }
|
||
|
}
|