Plugin interface, inherited by all plugins. More...
#include <Plugin.h>
Public Member Functions | |
virtual void | Init ()=0 |
Initializes plugin (called after loading all plugins). | |
void | SetController (Controller *controllerPtr) |
Sets the controller instance. More... | |
Public Attributes | |
std::map< std::string, std::string > | Settings |
Plugin settings (from the config file). | |
std::vector< std::function < void(Player)> > | PlayerConnect |
Vector with functions for the PlayerConnect event. | |
std::vector< std::function < void(Player)> > | PlayerDisconnect |
Vector with functions for the PlayerDisconnect event. | |
std::vector< std::function < void(Player, std::string)> > | PlayerChat |
Vector with functions for the PlayerChat event. | |
std::vector< std::function < void(std::string, std::string)> > | Echo |
Vector with functions for the Echo event. | |
std::vector< std::function < void()> > | BeginMatch |
Vector with functions for the BeginMatch event. | |
std::vector< std::function < void(std::vector < PlayerRanking >, int)> > | EndMatch |
Vector with functions for the EndMatch event. | |
std::vector< std::function < void(Map)> > | BeginMap |
Vector with functions for the BeginMap event. | |
std::vector< std::function < void(Map)> > | EndMap |
Vector with functions for the EndMap event. | |
std::vector< std::function < void(int, std::string)> > | StatusChanged |
Vector with functions for the StatusChanged event. | |
std::vector< std::function < void(Player, int, int, int)> > | PlayerCheckpoint |
Vector with functions for the PlayerCheckpoint event. | |
std::vector< std::function < void(Player, int)> > | PlayerFinish |
Vector with functions for the PlayerFinish event. | |
std::vector< std::function < void(Player)> > | PlayerIncoherence |
Vector with functions for the PlayerIncoherence event. | |
std::vector< std::function < void(int, int, std::string, int)> > | BillUpdated |
Vector with functions for the BillUpdated event. | |
std::vector< std::function < void(int, int, bool)> > | MapListModified |
Vector with functions for the MapListModified event. | |
std::vector< std::function < void(Player)> > | PlayerInfoChanged |
Vector with functions for the PlayerInfoChanged event. | |
std::vector< std::function < void(std::string, std::string, std::string, std::string)> > | VoteUpdated |
Vector with functions for the VoteUpdated event. | |
std::map< std::string, std::function< void(Player, std::vector< std::string >)> > | Commands |
Map with normal chat commands for the plugin. More... | |
std::map< std::string, std::function< void(Player, std::vector< std::string >)> > | AdminCommands |
Map with admin chat commands for the plugin. More... | |
std::string | Version |
Plugin version. | |
std::string | Author |
Plugin author. | |
Protected Member Functions | |
void | RegisterCommand (std::string name, std::function< void(Player, std::vector< std::string >)> method) |
Register chat command. More... | |
void | RegisterAdminCommand (std::string name, std::function< void(Player, std::vector< std::string >)> method) |
Register admin chat command. More... | |
Protected Attributes | |
Controller * | controller |
Struct with needed instances. | |
Plugin interface, inherited by all plugins.
|
inlineprotected |
Register admin chat command.
name | Admin chat command name. |
method | Method to be called for the command. |
|
inlineprotected |
Register chat command.
name | Chat command name. |
method | Method to be called for the command. |
|
inline |
Sets the controller instance.
controllerPtr | Pointer to the controller instance. |
std::map<std::string, std::function<void(Player, std::vector<std::string>)> > Plugin::AdminCommands |
Map with admin chat commands for the plugin.
std::map<std::string, std::function<void(Player, std::vector<std::string>)> > Plugin::Commands |
Map with normal chat commands for the plugin.