summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 01:34:47 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 01:34:47 +0200
commit41ba1a7642105ac21b67f4febac3eceef6a39f0a (patch)
treeaec9b8bfcde7f1ad44e2cb28149a41a091f60465 /source/PluginManager.h
parentBetter split of the fluid simulator functionality; removed the old LavaSimulator and WaterSimulator files. (diff)
downloadcuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.gz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.bz2
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.lz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.xz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.zst
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.zip
Diffstat (limited to 'source/PluginManager.h')
-rw-r--r--source/PluginManager.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/PluginManager.h b/source/PluginManager.h
index a62aa795a..8fc74c90c 100644
--- a/source/PluginManager.h
+++ b/source/PluginManager.h
@@ -7,7 +7,6 @@ struct lua_State;
class cLuaCommandBinder;
class cSquirrelCommandBinder;
class cPlugin;
-class cPlugin_Lua;
// fwd: cWorld.h
class cWorld;
@@ -86,14 +85,14 @@ public: //tolua_export
static cPluginManager * GetPluginManager(); //tolua_export
+ typedef std::map< AString, cPlugin * > PluginMap;
typedef std::list< cPlugin * > PluginList;
- cPlugin * GetPlugin( const AString & a_Plugin ) const; //tolua_export
- const PluginList & GetAllPlugins() const; // >> EXPORTED IN MANUALBINDINGS <<
+ cPlugin * GetPlugin( const AString & a_Plugin ) const; //tolua_export
+ const PluginMap & GetAllPlugins() const; // >> EXPORTED IN MANUALBINDINGS <<
+ void FindPlugins(); //tolua_export
void ReloadPlugins(); //tolua_export
bool AddPlugin( cPlugin* a_Plugin );
- bool AddPlugin( lua_State* a_LuaState, cPlugin* a_Plugin ); //tolua_export
- bool AddLuaPlugin( cPlugin_Lua* a_Plugin );
void AddHook( cPlugin* a_Plugin, PluginHook a_Hook ); //tolua_export
unsigned int GetNumPlugins() const; //tolua_export
@@ -117,10 +116,11 @@ public: //tolua_export
bool CallHookWeatherChanged (cWorld * a_World);
bool CallHookHandshake (cClientHandle * a_ClientHandle, const AString & a_Username);
- void RemoveHooks( cPlugin* a_Plugin );
- void RemovePlugin( cPlugin* a_Plugin, bool a_bDelete = false ); //tolua_export
- void RemoveLuaPlugin( std::string a_FileName ); //tolua_export
- cPlugin_Lua* GetLuaPlugin( lua_State* a_State ); //tolua_export
+ bool DisablePlugin( AString & a_PluginName ); //tolua_export
+ bool LoadPlugin( AString & a_PluginName ); //tolua_export
+
+ void RemoveHooks( cPlugin * a_Plugin );
+ void RemovePlugin( cPlugin * a_Plugin, bool a_bDelete = false );
cLuaCommandBinder* GetLuaCommandBinder() const { return m_LuaCommandBinder; }
@@ -132,11 +132,11 @@ private:
cPluginManager();
~cPluginManager();
- typedef std::list< cPlugin_Lua* > LuaPluginList;
typedef std::map< cPluginManager::PluginHook, cPluginManager::PluginList > HookMap;
- LuaPluginList m_LuaPlugins;
- PluginList m_Plugins;
+ PluginList m_DisablePluginList;
+
+ PluginMap m_Plugins;
HookMap m_Hooks;
void ReloadPluginsNow();