Reenable commands in Commands.java #2

Merged
Chaoscaot merged 2 commits from reenable-commands into main 2025-04-26 09:44:06 +02:00

View File

@ -1,126 +1,13 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chaoscaot <chaos@chaoscaot.de>
Date: Sun, 30 Mar 2025 12:00:56 +0200
Date: Sun, 30 Mar 2025 12:00:50 +0200
Subject: [PATCH] SW Disable Commands
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
index 9dd86cf63dd93620adb539a7a80a8d01c7ac08a2..3289d9f441aa219f019b63531b0ab431fcfe9115 100644
index 9dd86cf63dd93620adb539a7a80a8d01c7ac08a2..ca59e02fa0b2bbf2fdf53f088b0a6a876330fd73 100644
--- a/net/minecraft/commands/Commands.java
+++ b/net/minecraft/commands/Commands.java
@@ -155,67 +155,67 @@ public class Commands {
}
public Commands(Commands.CommandSelection selection, CommandBuildContext context, final boolean modern) {
// Paper end - Brigadier API - modern minecraft overloads that do not use redirects but are copies instead
- AdvancementCommands.register(this.dispatcher);
- AttributeCommand.register(this.dispatcher, context);
- ExecuteCommand.register(this.dispatcher, context);
- BossBarCommands.register(this.dispatcher, context);
+ //AdvancementCommands.register(this.dispatcher);
+ //AttributeCommand.register(this.dispatcher, context);
+ //ExecuteCommand.register(this.dispatcher, context);
+ //BossBarCommands.register(this.dispatcher, context);
ClearInventoryCommands.register(this.dispatcher, context);
- CloneCommands.register(this.dispatcher, context);
- DamageCommand.register(this.dispatcher, context);
- DataCommands.register(this.dispatcher);
- DataPackCommand.register(this.dispatcher);
- DebugCommand.register(this.dispatcher);
- DefaultGameModeCommands.register(this.dispatcher);
- DifficultyCommand.register(this.dispatcher);
+ //CloneCommands.register(this.dispatcher, context);
+ //DamageCommand.register(this.dispatcher, context);
+ //DataCommands.register(this.dispatcher);
+ //DataPackCommand.register(this.dispatcher);
+ //DebugCommand.register(this.dispatcher);
+ //DefaultGameModeCommands.register(this.dispatcher);
+ //DifficultyCommand.register(this.dispatcher);
EffectCommands.register(this.dispatcher, context);
- EmoteCommands.register(this.dispatcher);
+ //EmoteCommands.register(this.dispatcher);
EnchantCommand.register(this.dispatcher, context);
- ExperienceCommand.register(this.dispatcher);
- FillCommand.register(this.dispatcher, context);
+ //ExperienceCommand.register(this.dispatcher);
+ //FillCommand.register(this.dispatcher, context);
FillBiomeCommand.register(this.dispatcher, context);
- ForceLoadCommand.register(this.dispatcher);
- FunctionCommand.register(this.dispatcher);
+ //ForceLoadCommand.register(this.dispatcher);
+ //FunctionCommand.register(this.dispatcher);
GameModeCommand.register(this.dispatcher);
GameRuleCommand.register(this.dispatcher, context);
GiveCommand.register(this.dispatcher, context);
- HelpCommand.register(this.dispatcher);
- ItemCommands.register(this.dispatcher, context);
+ //HelpCommand.register(this.dispatcher);
+ //ItemCommands.register(this.dispatcher, context);
KickCommand.register(this.dispatcher);
KillCommand.register(this.dispatcher);
- ListPlayersCommand.register(this.dispatcher);
- LocateCommand.register(this.dispatcher, context);
- LootCommand.register(this.dispatcher, context);
- MsgCommand.register(this.dispatcher);
- ParticleCommand.register(this.dispatcher, context);
- PlaceCommand.register(this.dispatcher);
- PlaySoundCommand.register(this.dispatcher);
- RandomCommand.register(this.dispatcher);
- ReloadCommand.register(this.dispatcher);
- RecipeCommand.register(this.dispatcher);
- ReturnCommand.register(this.dispatcher);
- RideCommand.register(this.dispatcher);
+ //ListPlayersCommand.register(this.dispatcher);
+ //LocateCommand.register(this.dispatcher, context);
+ //LootCommand.register(this.dispatcher, context);
+ //MsgCommand.register(this.dispatcher);
+ //ParticleCommand.register(this.dispatcher, context);
+ //PlaceCommand.register(this.dispatcher);
+ //PlaySoundCommand.register(this.dispatcher);
+ //RandomCommand.register(this.dispatcher);
+ //ReloadCommand.register(this.dispatcher);
+ //RecipeCommand.register(this.dispatcher);
+ //ReturnCommand.register(this.dispatcher);
+ //RideCommand.register(this.dispatcher);
RotateCommand.register(this.dispatcher);
- SayCommand.register(this.dispatcher);
- ScheduleCommand.register(this.dispatcher);
- ScoreboardCommand.register(this.dispatcher, context);
- SeedCommand.register(this.dispatcher, selection != Commands.CommandSelection.INTEGRATED);
- SetBlockCommand.register(this.dispatcher, context);
- SetSpawnCommand.register(this.dispatcher);
+ //SayCommand.register(this.dispatcher);
+ //ScheduleCommand.register(this.dispatcher);
+ //ScoreboardCommand.register(this.dispatcher, context);
+ //SeedCommand.register(this.dispatcher, selection != Commands.CommandSelection.INTEGRATED);
+ //SetBlockCommand.register(this.dispatcher, context);
+ //SetSpawnCommand.register(this.dispatcher);
SetWorldSpawnCommand.register(this.dispatcher);
SpectateCommand.register(this.dispatcher);
- SpreadPlayersCommand.register(this.dispatcher);
- StopSoundCommand.register(this.dispatcher);
+ //SpreadPlayersCommand.register(this.dispatcher);
+ //StopSoundCommand.register(this.dispatcher);
SummonCommand.register(this.dispatcher, context);
- TagCommand.register(this.dispatcher);
- TeamCommand.register(this.dispatcher, context);
- TeamMsgCommand.register(this.dispatcher);
+ //TagCommand.register(this.dispatcher);
+ //TeamCommand.register(this.dispatcher, context);
+ //TeamMsgCommand.register(this.dispatcher);
TeleportCommand.register(this.dispatcher);
- TellRawCommand.register(this.dispatcher, context);
- TestCommand.register(this.dispatcher, context);
+ //TellRawCommand.register(this.dispatcher, context);
+ //TestCommand.register(this.dispatcher, context);
TickCommand.register(this.dispatcher);
TimeCommand.register(this.dispatcher);
- TitleCommand.register(this.dispatcher, context);
- TriggerCommand.register(this.dispatcher);
+ //TitleCommand.register(this.dispatcher, context);
+ //TriggerCommand.register(this.dispatcher);
WeatherCommand.register(this.dispatcher);
WorldBorderCommand.register(this.dispatcher);
if (JvmProfiler.INSTANCE.isAvailable()) {
@@ -235,20 +235,20 @@ public class Commands {
}