Files
MinecraftConsoles/Minecraft.World/CommandDispatcher.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

19 lines
432 B
C++

#pragma once
class Command;
class CommandSender;
class CommandDispatcher
{
private:
#ifdef __ORBIS__
unordered_map<EGameCommand, Command *,std::hash<int>> commandsById;
#else
unordered_map<EGameCommand, Command *> commandsById;
#endif
unordered_set<Command *> commands;
public:
void performCommand(std::shared_ptr<CommandSender> sender, EGameCommand command, byteArray commandData);
Command *addCommand(Command *command);
};