diff options
author | Nounours Heureux <schtroumps31@gmail.com> | 2015-06-02 17:06:18 +0200 |
---|---|---|
committer | Nounours Heureux <schtroumps31@gmail.com> | 2015-06-13 10:00:31 +0200 |
commit | d79f601d5a62f2291615955fac196dbab5caa15a (patch) | |
tree | 888f41c63844b9bd0336f9ef0ed585aa6a635883 /src/Bindings/PluginManager.cpp | |
parent | NetherPortalScanner: Fixed type conversion warnings. (diff) | |
download | cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar.gz cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar.bz2 cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar.lz cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar.xz cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.tar.zst cuberite-d79f601d5a62f2291615955fac196dbab5caa15a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 5b6bec728..712c385c7 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -675,6 +675,25 @@ bool cPluginManager::CallHookHopperPushingItem(cWorld & a_World, cHopperEntity & +bool cPluginManager::CallHookKilled(cEntity & a_Victim, TakeDamageInfo & a_TDI, AString & a_DeathMessage) +{ + FIND_HOOK(HOOK_KILLED); + VERIFY_HOOK; + + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnKilled(a_Victim, a_TDI, a_DeathMessage)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookKilling(cEntity & a_Victim, cEntity * a_Killer, TakeDamageInfo & a_TDI) { FIND_HOOK(HOOK_KILLING); |