Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clamp-levels option #1609

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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