diff options
author | Mattes D <github@xoft.cz> | 2013-12-11 17:02:45 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-12-11 17:02:45 +0100 |
commit | 7035d31e9d8f4d25efc722cb3d2a49fb756249ee (patch) | |
tree | 75dd002246aa046a67c6675e9f3a4f93bb644e33 /src/Bindings/PluginManager.cpp | |
parent | ExpOrbs now move. (diff) | |
parent | HOOK_WORLD_STARTED now gets called when the CreateAndInitializeWorld function is used. (diff) | |
download | cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.gz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.bz2 cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.lz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.xz cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.tar.zst cuberite-7035d31e9d8f4d25efc722cb3d2a49fb756249ee.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 29ea26577..12263605f 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1209,6 +1209,27 @@ bool cPluginManager::CallHookWeatherChanging(cWorld & a_World, eWeather & a_NewW +bool cPluginManager::CallHookWorldStarted(cWorld & a_World) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_WORLD_STARTED); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnWorldStarted(a_World)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookWorldTick(cWorld & a_World, float a_Dt, int a_LastTickDurationMSec) { HookMap::iterator Plugins = m_Hooks.find(HOOK_WORLD_TICK); |