File tree Expand file tree Collapse file tree
minecraft-patches/sources/net/minecraft
src/main/java/org/purpurmc/purpur Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 RaidCommand.register(this.dispatcher, context);
1010 DebugPathCommand.register(this.dispatcher);
1111 DebugMobSpawningCommand.register(this.dispatcher);
12+ @@ -264,6 +_,12 @@
13+ }
14+ }
15+
16+ + // Purpur start - register disabled minecraft commands
17+ + if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDisabledCommands) {
18+ + net.minecraft.server.commands.ChaseCommand.register(this.dispatcher);
19+ + }
20+ + // Purpur end - register disabled minecraft commands
21+ +
22+ if (selection.includeDedicated) {
23+ BanIpCommands.register(this.dispatcher);
24+ BanListCommands.register(this.dispatcher);
1225@@ -280,6 +_,14 @@
1326 StopCommand.register(this.dispatcher);
1427 TransferCommand.register(this.dispatcher);
Original file line number Diff line number Diff line change 11--- a/net/minecraft/server/Main.java
22+++ b/net/minecraft/server/Main.java
3- @@ -109,6 +_,12 @@
3+ @@ -109,6 +_,13 @@
44 JvmProfiler.INSTANCE.start(Environment.SERVER);
55 }
66
77+ // Purpur start - Add toggle for enchant level clamping - load config files early
88+ org.bukkit.configuration.file.YamlConfiguration purpurConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionSet.valueOf("purpur-settings"));
99+ org.purpurmc.purpur.PurpurConfig.clampEnchantLevels = purpurConfiguration.getBoolean("settings.enchantment.clamp-levels", true);
1010+ org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands = purpurConfiguration.getBoolean("settings.register-minecraft-debug-commands"); // Purpur - register minecraft debug commands
11+ + org.purpurmc.purpur.PurpurConfig.registerMinecraftDisabledCommands = purpurConfiguration.getBoolean("settings.register-minecraft-disabled-commands"); // Purpur - register disabled minecraft commands
1112+ // Purpur end - Add toggle for enchant level clamping - load config files early
1213+
1314 io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper
Original file line number Diff line number Diff line change @@ -599,6 +599,11 @@ private static void registerMinecraftDebugCommands() {
599599 registerMinecraftDebugCommands = getBoolean ("settings.register-minecraft-debug-commands" , registerMinecraftDebugCommands );
600600 }
601601
602+ public static boolean registerMinecraftDisabledCommands = false ;
603+ private static void registerMinecraftDisabledCommands () {
604+ registerMinecraftDisabledCommands = getBoolean ("settings.register-minecraft-disabled-commands" , registerMinecraftDebugCommands );
605+ }
606+
602607 public static List <String > startupCommands = new ArrayList <>();
603608 private static void startupCommands () {
604609 startupCommands .clear ();
You can’t perform that action at this time.
0 commit comments