summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 15:26:41 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 15:26:41 +0100
commit339d55511127981335193d07037719a4b26c4600 (patch)
treea11e1e4ca6a2bceac6b78a070069c93668e66e03 /src/Bindings/PluginManager.cpp
parentFixed non-virtual destructors warnings. (diff)
downloadcuberite-339d55511127981335193d07037719a4b26c4600.tar
cuberite-339d55511127981335193d07037719a4b26c4600.tar.gz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.bz2
cuberite-339d55511127981335193d07037719a4b26c4600.tar.lz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.xz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.zst
cuberite-339d55511127981335193d07037719a4b26c4600.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 7d346c522..aa2c09a3d 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -1154,6 +1154,27 @@ bool cPluginManager::CallHookPreCrafting(const cPlayer * a_Player, const cCrafti
+bool cPluginManager::CallHookProjectileHitEntity(cProjectileEntity & a_Projectile, cEntity & a_HitEntity)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_PROJECTILE_HIT_ENTITY);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnProjectileHitEntity(a_Projectile, a_HitEntity))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookSpawnedEntity(cWorld & a_World, cEntity & a_Entity)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_SPAWNED_ENTITY);