Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
60b59901af
Restab at the last upstream to add support for migrating the option for disabling player data saving back into spigots config, vs blindly dropping it 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 Spigot Changes: a19903d2 SPIGOT-520: Add option to disable player data saving
28 Zeilen
1.3 KiB
Diff
28 Zeilen
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 5fe6c36bdf8527d7fcb41e8d471194c7e395b946..29862494604ac1a0aaedd4ba84bc9d044fad9629 100644
|
|
--- 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() {
|
|
+ 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();
|
|
+ }
|
|
+ }
|
|
}
|