LexManos committed 2023-12-06 10:38:20 -08:00
1 parent 6f9f0f0cfa
commit d2367d81fc
456 files changed
+2432 -2933

No files matched your search

@@ -18,7 +18,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.commands.CommandBuildContext;
import net.minecraft.commands.CommandRuntimeException;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.SharedSuggestionProvider;
import net.minecraft.commands.synchronization.SuggestionProviders;
@@ -156,16 +155,11 @@ public class ClientCommandHandler
ClientCommandSourceStack source = getSource();
try
{
try {
commands.execute(reader, source);
}
catch (CommandRuntimeException execution)// Probably thrown by the command
{
Minecraft.getInstance().player.sendSystemMessage(Component.literal("").append(execution.getComponent()).withStyle(ChatFormatting.RED));
}
catch (CommandSyntaxException syntax)// Usually thrown by the CommandDispatcher
{
//} catch (CommandRuntimeException execution) { // Probably thrown by the command
// Minecraft.getInstance().player.sendSystemMessage(Component.literal("").append(execution.getComponent()).withStyle(ChatFormatting.RED));
} catch (CommandSyntaxException syntax) {
if (syntax.getType() == CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownCommand() || syntax.getType() == CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownArgument())
{
// in case of unknown command, let the server try and handle it