aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/CommandDispatcher.h
blob: 34d1b1094e2c4bc3cc255a771d3872ac028f9c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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:
	int performCommand(shared_ptr<CommandSender> sender, EGameCommand command, byteArray commandData);
	Command *addCommand(Command *command);
};