Skip to content
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 @@ -9,6 +9,19 @@
RaidCommand.register(this.dispatcher, context);
DebugPathCommand.register(this.dispatcher);
DebugMobSpawningCommand.register(this.dispatcher);
@@ -264,6 +_,12 @@
}
}

+ // Purpur start - register disabled minecraft commands
+ if (org.purpurmc.purpur.PurpurConfig.registerMinecraftDisabledCommands) {
+ net.minecraft.server.commands.ChaseCommand.register(this.dispatcher);
+ }
+ // Purpur end - register disabled minecraft commands
+
if (selection.includeDedicated) {
BanIpCommands.register(this.dispatcher);
BanListCommands.register(this.dispatcher);
@@ -280,6 +_,14 @@
StopCommand.register(this.dispatcher);
TransferCommand.register(this.dispatcher);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -109,6 +_,12 @@
@@ -109,6 +_,13 @@
JvmProfiler.INSTANCE.start(Environment.SERVER);
}

+ // Purpur start - Add toggle for enchant level clamping - 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", true);
+ org.purpurmc.purpur.PurpurConfig.registerMinecraftDebugCommands = purpurConfiguration.getBoolean("settings.register-minecraft-debug-commands"); // Purpur - register minecraft debug commands
+ org.purpurmc.purpur.PurpurConfig.registerMinecraftDisabledCommands = purpurConfiguration.getBoolean("settings.register-minecraft-disabled-commands"); // Purpur - register disabled minecraft commands
+ // Purpur end - Add toggle for enchant level clamping - load config files early
+
io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@ private static void registerMinecraftDebugCommands() {
registerMinecraftDebugCommands = getBoolean("settings.register-minecraft-debug-commands", registerMinecraftDebugCommands);
}

public static boolean registerMinecraftDisabledCommands = false;
private static void registerMinecraftDisabledCommands() {
registerMinecraftDisabledCommands = getBoolean("settings.register-minecraft-disabled-commands", registerMinecraftDebugCommands);
}

public static List<String> startupCommands = new ArrayList<>();
private static void startupCommands() {
startupCommands.clear();
Expand Down