summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
commitd9a429ec6463818b50f3c930732abaa29e0af558 (patch)
treeb1024f5001265301ed1ca6e23bd6d5c325e825fd /src/Bindings/PluginManager.cpp
parentfixed unused expression warnings in blockFire (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.gz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.bz2
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.lz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.xz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.zst
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-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);