mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
Add config migration for named entity death logging option (#6390)
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||||
Date: Mon, 26 Mar 2018 18:30:53 +0300
|
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,
|
This patch contains config migrations for when upstream adds options
|
||||||
however, we should still migrate our configuration back upstream,
|
which Paper already had.
|
||||||
to prevent unexpected situations
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
@@ -23,5 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
|
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
|
||||||
+ SpigotConfig.save();
|
+ 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();
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
Reference in New Issue
Block a user