summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.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/PluginLua.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 'src/Bindings/PluginLua.cpp')
-rw-r--r--src/Bindings/PluginLua.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index d714f2112..f27cee76e 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -1143,6 +1143,21 @@ bool cPluginLua::OnWeatherChanging(cWorld & a_World, eWeather & a_NewWeather)
+bool cPluginLua::OnWorldStarted(cWorld & a_World)
+{
+ cCSLock Lock(m_CriticalSection);
+ cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_WORLD_STARTED];
+ for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
+ {
+ m_LuaState.Call((int)(**itr), &a_World);
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginLua::OnWorldTick(cWorld & a_World, float a_Dt, int a_LastTickDurationMSec)
{
cCSLock Lock(m_CriticalSection);