diff options
author | madmaxoft <github@xoft.cz> | 2013-08-21 21:29:30 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-21 21:29:30 +0200 |
commit | f3a0fed72427e747d2c8c9599dd8279ff598dc28 (patch) | |
tree | 07bacb9492aeb37205b50c249e798fdc5993d82d /source/PluginManager.cpp | |
parent | cLuaState: Added LogStackTrace() and GetTypeText() utility functions (diff) | |
download | cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar.gz cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar.bz2 cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar.lz cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar.xz cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.tar.zst cuberite-f3a0fed72427e747d2c8c9599dd8279ff598dc28.zip |
Diffstat (limited to '')
-rw-r--r-- | source/PluginManager.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp index e6ff3e6e2..a2726bd58 100644 --- a/source/PluginManager.cpp +++ b/source/PluginManager.cpp @@ -61,7 +61,7 @@ void cPluginManager::FindPlugins(void) // First get a clean list of only the currently running plugins, we don't want to mess those up for (PluginMap::iterator itr = m_Plugins.begin(); itr != m_Plugins.end();) { - if( itr->second == NULL ) + if (itr->second == NULL) { PluginMap::iterator thiz = itr; ++thiz; @@ -1585,6 +1585,15 @@ void cPluginManager::TabCompleteCommand(const AString & a_Text, AStringVector & +bool cPluginManager::IsValidHookType(int a_HookType) +{ + return ((a_HookType >= 0) && (a_HookType <= HOOK_MAX)); +} + + + + + bool cPluginManager::AddPlugin(cPlugin * a_Plugin) { m_Plugins[a_Plugin->GetDirectory()] = a_Plugin; @@ -1603,7 +1612,7 @@ bool cPluginManager::AddPlugin(cPlugin * a_Plugin) -void cPluginManager::AddHook(cPlugin * a_Plugin, PluginHook a_Hook) +void cPluginManager::AddHook(cPlugin * a_Plugin, int a_Hook) { if (!a_Plugin) { |