Skip to content

Commit

Permalink
only initialize the config once, closes #1637
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Jan 30, 2025
1 parent 88ed744 commit 79c1192
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
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 {
+ org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings"));
+ } catch (Exception e) {
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
+ return false;
+ }
+ 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

this.setPvpAllowed(properties.pvp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public static void init(File configFile) {
commands = new HashMap<>();
commands.put("purpur", new PurpurCommand("purpur"));

version = getInt("config-version", 38);
set("config-version", 38);
version = getInt("config-version", 39);
set("config-version", 39);

readConfig(PurpurConfig.class, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ private void toolSettings() {
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>()));
}
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_log", Map.of("into", "minecraft:stripped_pale_oak_log", "drops", new HashMap<String, Double>()));
}
Expand Down

0 comments on commit 79c1192

Please sign in to comment.