summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 21:50:30 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 21:50:30 +0200
commit4f5d73b7704e351365a987b421c35f1384afa240 (patch)
tree88b4da666ea4723377cfa489c737618ef8cde2b1 /src/Bindings/PluginManager.cpp
parentMerge pull request #1061 from mc-server/portals (diff)
downloadcuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar.gz
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar.bz2
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar.lz
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar.xz
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.tar.zst
cuberite-4f5d73b7704e351365a987b421c35f1384afa240.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 088b92a6d..3560b8660 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -476,11 +476,9 @@ bool cPluginManager::CallHookDisconnect(cClientHandle & a_Client, const AString
bool cPluginManager::CallHookEntityAddEffect(cEntity & a_Entity, int a_EffectType, int a_EffectDurationTicks, int a_EffectIntensity, double a_DistanceModifier)
{
- HookMap::iterator Plugins = m_Hooks.find(HOOK_ENTITY_ADD_EFFECT);
- if (Plugins == m_Hooks.end())
- {
- return false;
- }
+ FIND_HOOK(HOOK_ENTITY_ADD_EFFECT);
+ VERIFY_HOOK;
+
for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
{
if ((*itr)->OnEntityAddEffect(a_Entity, a_EffectType, a_EffectDurationTicks, a_EffectIntensity, a_DistanceModifier))