only initialize the config once, closes #1637

This commit is contained in:
granny
2025-01-30 11:44:23 -08:00
parent 88ed744298
commit 79c1192710
3 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
+ // Purpur start - Purpur config files + /*// Purpur start - Purpur config files // Purpur - Configurable void damage height and damage
+ try { + try {
+ org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings")); + org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings"));
+ } catch (Exception e) { + } catch (Exception e) {
@@ -20,7 +20,7 @@
+ return false; + return false;
+ } + }
+ org.purpurmc.purpur.PurpurConfig.registerCommands(); + org.purpurmc.purpur.PurpurConfig.registerCommands();
+ // Purpur end - Purpur config files + */// Purpur end - Purpur config files // Purpur - Configurable void damage height and damage
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
this.setPvpAllowed(properties.pvp); this.setPvpAllowed(properties.pvp);

View File

@@ -74,8 +74,8 @@ public class PurpurConfig {
commands = new HashMap<>(); commands = new HashMap<>();
commands.put("purpur", new PurpurCommand("purpur")); commands.put("purpur", new PurpurCommand("purpur"));
version = getInt("config-version", 38); version = getInt("config-version", 39);
set("config-version", 38); set("config-version", 39);
readConfig(PurpurConfig.class, null); readConfig(PurpurConfig.class, null);

View File

@@ -611,7 +611,7 @@ public class PurpurWorldConfig {
PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:weathered_copper_bulb", Map.of("into", "minecraft:exposed_copper_bulb", "drops", new HashMap<String, Double>())); PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:weathered_copper_bulb", Map.of("into", "minecraft:exposed_copper_bulb", "drops", new HashMap<String, Double>()));
PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:oxidized_copper_bulb", Map.of("into", "minecraft:weathered_copper_bulb", "drops", new HashMap<String, Double>())); PurpurConfig.config.set("world-settings.default.tools.axe.weatherables.minecraft:oxidized_copper_bulb", Map.of("into", "minecraft:weathered_copper_bulb", "drops", new HashMap<String, Double>()));
} }
if (PurpurConfig.version < 38) { if (PurpurConfig.version < 39) {
PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_wood", Map.of("into", "minecraft:stripped_pale_oak_wood", "drops", new HashMap<String, Double>())); PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_wood", Map.of("into", "minecraft:stripped_pale_oak_wood", "drops", new HashMap<String, Double>()));
PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_log", Map.of("into", "minecraft:stripped_pale_oak_log", "drops", new HashMap<String, Double>())); PurpurConfig.config.set("world-settings.default.tools.axe.strippables.minecraft:pale_oak_log", Map.of("into", "minecraft:stripped_pale_oak_log", "drops", new HashMap<String, Double>()));
} }