2021-06-11 12:02:28 +00: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
|
2021-08-13 20:24:25 +00:00
|
|
|
Subject: [PATCH] Upstream config migrations
|
2021-06-11 12:02:28 +00:00
|
|
|
|
2021-08-13 20:24:25 +00:00
|
|
|
This patch contains config migrations for when upstream adds options
|
|
|
|
which Paper already had.
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2022-06-03 04:26:56 +00:00
|
|
|
index a8de81b1a153525b2d0d6b01802b7733947527a2..e2fed9b89ec1acb63a140f0f67814587ab6942bc 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2021-12-28 08:10:38 +00:00
|
|
|
@@ -291,4 +291,23 @@ public class PaperConfig {
|
2021-06-11 12:02:28 +00: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;
|
2021-12-28 08:10:38 +00:00
|
|
|
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disablePlayerDataSaving);
|
2021-06-11 12:02:28 +00:00
|
|
|
+ SpigotConfig.save();
|
2021-12-28 08:10:38 +00:00
|
|
|
+ config.set("settings.save-player-data", null);
|
2021-06-11 12:02:28 +00:00
|
|
|
+ }
|
2021-08-13 20:24:25 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private static void namedEntityDeaths() {
|
|
|
|
+ Object val = config.get("settings.log-named-entity-deaths");
|
|
|
|
+ if (val instanceof Boolean bool && !bool) {
|
|
|
|
+ SpigotConfig.logNamedDeaths = false;
|
|
|
|
+ SpigotConfig.config.set("settings.log-named-deaths", false);
|
|
|
|
+ SpigotConfig.save();
|
|
|
|
+ }
|
2021-06-11 12:02:28 +00:00
|
|
|
+ }
|
|
|
|
}
|