Mania++
 All Classes Functions Variables Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Plugin Class Referenceabstract

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

Controllercontroller
 Struct with needed instances.
 

Detailed Description

Plugin interface, inherited by all plugins.

Member Function Documentation

void Plugin::RegisterAdminCommand ( std::string  name,
std::string  description,
Permission  access,
std::function< void(Player, std::vector< std::string >)>  method 
)
inlineprotected

Register admin chat command.

Parameters
nameAdmin chat command name.
descriptionCommand description.
accessPermission level required to use command.
methodMethod to be called for the command.
void Plugin::RegisterCallableMethod ( std::string  name,
std::function< boost::any(boost::any)>  method 
)
inlineprotected

Register callable method.

Parameters
nameMethod name.
methodCallable method.
void Plugin::RegisterCommand ( std::string  name,
std::string  description,
std::function< void(Player, std::vector< std::string >)>  method 
)
inlineprotected

Register chat command.

Parameters
nameChat command name.
descriptionCommand description.
methodMethod to be called for the command.
void Plugin::SetController ( Controller controllerPtr)
inline

Sets the controller instance.

Parameters
controllerPtrPointer to the controller instance.

The documentation for this class was generated from the following file: