mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
35 lines
1.8 KiB
Diff
35 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Thu, 1 Jul 2021 19:25:05 -0500
|
|
Subject: [PATCH] Structure seed options
|
|
|
|
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
index 32dcd6db3c3c06d34bb4303bbaef8db648b1843d..307e8eb85e1f70ea45bc47ff80faac2db1927a61 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
@@ -217,6 +217,23 @@ public class PurpurConfig {
|
|
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
|
|
}
|
|
|
|
+ public static int seedStructureBuriedTreasure = -1;
|
|
+ public static int seedStructureMineshaft = -1;
|
|
+ private static void seedSettings() {
|
|
+ seedStructureBuriedTreasure = getInt("settings.seed.structure.buried_treasure", seedStructureBuriedTreasure);
|
|
+ seedStructureMineshaft = getInt("settings.seed.structure.mineshaft", seedStructureMineshaft);
|
|
+ if (version < 26) {
|
|
+ int stronghold = getInt("settings.seed.structure.stronghold", -1);
|
|
+ set("settings.seed.structure.stronghold", null);
|
|
+ if (stronghold != -1) {
|
|
+ org.spigotmc.SpigotConfig.config.set("world-settings.default.seed-stronghold", stronghold);
|
|
+ org.spigotmc.SpigotConfig.save();
|
|
+ }
|
|
+ }
|
|
+ // hide these from timings report
|
|
+ if (!TimingsManager.hiddenConfigs.contains("settings.seed")) TimingsManager.hiddenConfigs.add("settings.seed");
|
|
+ }
|
|
+
|
|
public static String serverModName = "Purpur";
|
|
private static void serverModName() {
|
|
serverModName = getString("settings.server-mod-name", serverModName);
|