Skip to content

Commit

Permalink
Fix clamp-levels option not being true by default (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Onako2 authored Nov 21, 2024
1 parent 9968cbb commit db09358
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add toggle for enchant level clamping


diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 90ca25c4aaf92a5639839a7cdaee2ffcdb75efa7..5e9a2838335179566bdcd79bca0cb849c725b73b 100644
index 90ca25c4aaf92a5639839a7cdaee2ffcdb75efa7..463eb4844e467c5c7018087e4f21d7d41e1c9063 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -120,6 +120,11 @@ public class Main {
Expand All @@ -14,7 +14,7 @@ index 90ca25c4aaf92a5639839a7cdaee2ffcdb75efa7..5e9a2838335179566bdcd79bca0cb849

+ // Purpur start - load config files early
+ org.bukkit.configuration.file.YamlConfiguration purpurConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("purpur-settings"));
+ org.purpurmc.purpur.PurpurConfig.clampEnchantLevels = purpurConfiguration.getBoolean("settings.enchantment.clamp-levels");
+ org.purpurmc.purpur.PurpurConfig.clampEnchantLevels = purpurConfiguration.getBoolean("settings.enchantment.clamp-levels", true);
+ // Purpur end - load config files early
+
io.papermc.paper.plugin.PluginInitializerManager.load(optionset); // Paper
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0284-register-minecraft-debug-commands.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ index 96449b0d153ce4124403368e406354fb2412e353..6a8248b43bf739b691c7e888ebf964ca
DebugPathCommand.register(this.dispatcher);
DebugMobSpawningCommand.register(this.dispatcher);
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 5e9a2838335179566bdcd79bca0cb849c725b73b..f0d762bd140fad27ae73bcf3e61b640b9e3f2592 100644
index 463eb4844e467c5c7018087e4f21d7d41e1c9063..ecaec3c7b5768771b00c4c33d48a76ba22653a79 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -123,6 +123,7 @@ public class Main {
// Purpur start - load config files early
org.bukkit.configuration.file.YamlConfiguration purpurConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("purpur-settings"));
org.purpurmc.purpur.PurpurConfig.clampEnchantLevels = purpurConfiguration.getBoolean("settings.enchantment.clamp-levels");
org.purpurmc.purpur.PurpurConfig.clampEnchantLevels = purpurConfiguration.getBoolean("settings.enchantment.clamp-levels", true);
+ org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands = purpurConfiguration.getBoolean("settings.register-minecraft-debug-commands");
// Purpur end - load config files early

Expand Down

0 comments on commit db09358

Please sign in to comment.