13
0
geforkt von Mirrors/Paper

Add config migration for named entity death logging option (#6390)

Dieser Commit ist enthalten in:
Jason Penilla 2021-08-13 13:24:25 -07:00
Ursprung 7b05942bcc
Commit 18178d7c9a

Datei anzeigen

@ -1,11 +1,10 @@
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
Subject: [PATCH] Upstream config migrations
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
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@ -23,5 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
+ SpigotConfig.save();
+ }
+ }
+
+ 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();
+ }
+ }
}