diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-03-16 14:38:41 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-03-27 23:20:28 +0100 |
commit | c4a8336e847d2f4731dd9d899d6af200631f8aef (patch) | |
tree | b4032137f8033224894a190d0c799eb819989f22 /src/Bindings/PluginManager.cpp | |
parent | Add new leaves to all classes. (diff) | |
download | cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.gz cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.bz2 cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.lz cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.xz cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.zst cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.zip |
Diffstat (limited to '')
-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 b9cf160c4..142b4b5ad 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -205,6 +205,27 @@ void cPluginManager::Tick(float a_Dt) +bool cPluginManager::CallHookBlockSpread(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_BLOCK_SPREAD); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnBlockSpread(a_World, a_BlockX, a_BlockY, a_BlockZ)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookBlockToPickups( cWorld * a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, |