Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
87e443bf9a
This is an ode to all those times when you shoulda just gone to bed
37 Zeilen
1.7 KiB
Diff
37 Zeilen
1.7 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] Upstream config migrations
|
|
|
|
This patch contains config migrations for when upstream adds options
|
|
which Paper already had.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index f4735cc330822183e098a67f2c0f00f21db9e137..806b612d3c9ca1dd76be88170b3268ca45acef63 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -291,4 +291,23 @@ 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.disablePlayerDataSaving);
|
|
+ SpigotConfig.save();
|
|
+ config.set("settings.save-player-data", null);
|
|
+ }
|
|
+ }
|
|
+
|
|
+ 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();
|
|
+ }
|
|
+ }
|
|
}
|