diff options
author | madmaxoft <github@xoft.cz> | 2014-03-28 16:39:32 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-03-28 16:39:32 +0100 |
commit | 173fd0dd9246a0a30041cc103327aed5dd7166d5 (patch) | |
tree | 095ec63173d417d83cc709a4bd0fa35801484e4b /src/Bindings/PluginManager.cpp | |
parent | Fixed Prefab's rotations. (diff) | |
parent | Add missing ChunkDesc import. (diff) | |
download | cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.gz cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.bz2 cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.lz cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.xz cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.zst cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-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..7d346c522 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, eSpreadSource a_Source) +{ + 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, a_Source)) + { + 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, |