first commit

This commit is contained in:
murdle
2026-03-01 02:38:58 +02:00
commit 19250b9db4
19111 changed files with 4358159 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#include "stdafx.h"
#include "net.minecraft.commands.h"
#include "CommandDispatcher.h"
void CommandDispatcher::performCommand(shared_ptr<CommandSender> sender, EGameCommand command, byteArray commandData)
{
AUTO_VAR(it, commandsById.find(command));
if(it != commandsById.end())
{
Command *command = it->second;
if (command->canExecute(sender))
{
command->execute(sender, commandData);
}
else
{
#ifndef _CONTENT_PACKAGE
sender->sendMessage(L"\u00A7cYou do not have permission to use this command.");
#endif
}
}
else
{
app.DebugPrintf("Command %d not found!\n", command);
}
}
Command *CommandDispatcher::addCommand(Command *command)
{
commandsById[command->getId()] = command;
commands.insert(command);
return command;
}