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()> > | EverySecond |
Vector with functions for the EverySecond event. | |
std::vector< std::function < void()> > | EveryMinute |
Vector with functions for the EveryMinute event. | |
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, ChatCommand > | Commands |
Map with normal chat commands for the plugin. | |
std::map< std::string, ChatCommand > | AdminCommands |
Map with admin chat commands for the plugin. | |
std::map< std::string, std::function< boost::any(boost::any)> > | Methods |
Map with callable methods for the plugin. | |
std::string | Version |
Plugin version. | |
std::string | Author |
Plugin author. | |
std::string | Description |
Plugin description. | |
Protected Member Functions | |
void | RegisterCommand (std::string name, std::string description, std::function< void(Player, std::vector< std::string >)> method) |
Register chat command. More... | |
void | RegisterAdminCommand (std::string name, std::string description, Permission access, std::function< void(Player, std::vector< std::string >)> method) |
Register admin chat command. More... | |
void | RegisterCallableMethod (std::string name, std::function< boost::any(boost::any)> method) |
Register callable method. 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. |
description | Command description. |
access | Permission level required to use command. |
method | Method to be called for the command. |
|
inlineprotected |
Register callable method.
name | Method name. |
method | Callable method. |
|
inlineprotected |
Register chat command.
name | Chat command name. |
description | Command description. |
method | Method to be called for the command. |
|
inline |
Sets the controller instance.
controllerPtr | Pointer to the controller instance. |