mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Add support for "/chase", a disabled Minecraft command. (#1690)
Co-authored-by: granny <granny@purpurmc.org>
This commit is contained in:
@@ -9,6 +9,19 @@
|
|||||||
RaidCommand.register(this.dispatcher, context);
|
RaidCommand.register(this.dispatcher, context);
|
||||||
DebugPathCommand.register(this.dispatcher);
|
DebugPathCommand.register(this.dispatcher);
|
||||||
DebugMobSpawningCommand.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 @@
|
@@ -280,6 +_,14 @@
|
||||||
StopCommand.register(this.dispatcher);
|
StopCommand.register(this.dispatcher);
|
||||||
TransferCommand.register(this.dispatcher);
|
TransferCommand.register(this.dispatcher);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/Main.java
|
--- a/net/minecraft/server/Main.java
|
||||||
+++ b/net/minecraft/server/Main.java
|
+++ b/net/minecraft/server/Main.java
|
||||||
@@ -109,6 +_,12 @@
|
@@ -109,6 +_,13 @@
|
||||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
+ org.bukkit.configuration.file.YamlConfiguration purpurConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionSet.valueOf("purpur-settings"));
|
+ 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.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.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
|
+ // Purpur end - Add toggle for enchant level clamping - load config files early
|
||||||
+
|
+
|
||||||
io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper
|
io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper
|
||||||
|
|||||||
@@ -599,6 +599,11 @@ public class PurpurConfig {
|
|||||||
registerMinecraftDebugCommands = getBoolean("settings.register-minecraft-debug-commands", 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<>();
|
public static List<String> startupCommands = new ArrayList<>();
|
||||||
private static void startupCommands() {
|
private static void startupCommands() {
|
||||||
startupCommands.clear();
|
startupCommands.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user