diff options
author | madmaxoft <github@xoft.cz> | 2013-12-29 12:51:58 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-12-29 12:51:58 +0100 |
commit | 248ba1ea9f6826234535c2a777b3834fbe264e0d (patch) | |
tree | aa52fc2b6d3f78dcaea12d08dd4a2583516d8c8f /src/Bindings/PluginLua.cpp | |
parent | Merge pull request #481 from MikeHunsinger/master (diff) | |
download | cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar.gz cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar.bz2 cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar.lz cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar.xz cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.tar.zst cuberite-248ba1ea9f6826234535c2a777b3834fbe264e0d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginLua.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp index 0e5a66cd6..69e83fb0a 100644 --- a/src/Bindings/PluginLua.cpp +++ b/src/Bindings/PluginLua.cpp @@ -910,6 +910,24 @@ bool cPluginLua::OnPlayerUsingItem(cPlayer & a_Player, int a_BlockX, int a_Block +bool cPluginLua::OnPluginsLoaded(void) +{ + cCSLock Lock(m_CriticalSection); + bool res = false; + cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLUGINS_LOADED]; + for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) + { + bool ret = false; + m_LuaState.Call((int)(**itr), cLuaState::Return, ret); + res = res || ret; + } + return res; +} + + + + + bool cPluginLua::OnPostCrafting(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe) { cCSLock Lock(m_CriticalSection); |