diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 21:20:31 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 21:20:31 +0200 |
commit | e1b5f0af046f2c4c05789adf33eef5404adba2c3 (patch) | |
tree | 6738e8d63067ef348113e0ae50433722ec952c38 /source/cPluginManager.cpp | |
parent | Added a world parameter to HOOK_CHUNK_GENERATING. (diff) | |
download | cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar.gz cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar.bz2 cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar.lz cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar.xz cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.tar.zst cuberite-e1b5f0af046f2c4c05789adf33eef5404adba2c3.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cPluginManager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp index 77b8402c8..7c0d49ed5 100644 --- a/source/cPluginManager.cpp +++ b/source/cPluginManager.cpp @@ -512,6 +512,27 @@ bool cPluginManager::CallHookBlockToPickup( +bool cPluginManager::CallHookWeatherChanged(cWorld * a_World) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_POST_CRAFTING); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnWeatherChanged(a_World)) + { + return true; + } + } + return false; +} + + + + + cPlugin* cPluginManager::GetPlugin( const char* a_Plugin ) const { for( PluginList::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr ) |