1 #ifndef COMMANDMANAGER_H_
2 #define COMMANDMANAGER_H_
8 #include "../Objects/Player.h"
27 int RegisterCommands(std::map<std::string, std::function<
void(
Player, std::vector<std::string>)>> methods);
45 std::map<std::string, std::function<void(Player, std::vector<std::string>)>>
commands;
46 std::map<std::string, std::function<void(Player, std::vector<std::string>)>>
adminCommands;
49 #endif // COMMANDMANAGER_H_
void HandleCommand(Player player, std::string text)
Handles chat commands (from PlayerChat callback).
Definition: CommandManager.cpp:45
CommandManager()
Initializes the command-maps.
Definition: CommandManager.cpp:3
Contains all information about a player in easy-to-use format.
Definition: Player.h:10
int RegisterAdminCommands(std::map< std::string, std::function< void(Player, std::vector< std::string >)>> methods)
Registers the admin chat commands (from the plugins).
Definition: CommandManager.cpp:27
std::map< std::string, std::function< void(Player, std::vector< std::string >)> > commands
Map with normal chat commands.
Definition: CommandManager.h:45
std::map< std::string, std::function< void(Player, std::vector< std::string >)> > adminCommands
Map with admin chat commands.
Definition: CommandManager.h:46
int RegisterCommands(std::map< std::string, std::function< void(Player, std::vector< std::string >)>> methods)
Registers the chat commands (from the plugins).
Definition: CommandManager.cpp:9
Manages the chat commands.
Definition: CommandManager.h:14