summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-11 12:39:13 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-11 12:39:13 +0100
commit12bd5082b897b3df20cf84eebda07d3135cdbe43 (patch)
tree7f8ab91a8e8d444aeb01c4f31a6f61cb5b0b18fb /src/Bindings/PluginManager.cpp
parentMerge pull request #412 from mc-server/fixes (diff)
downloadcuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.gz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.bz2
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.lz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.xz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.zst
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/PluginManager.cpp21
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);