4jcraft/Minecraft.World/Commands/CommandDispatcher.h
2026-03-21 15:14:17 -05:00

19 lines
482 B
C++

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