diff options
author | Alexander Harkness <me@bearbin.net> | 2015-06-13 12:59:07 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-06-13 12:59:07 +0200 |
commit | ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537 (patch) | |
tree | ade44b9828d0146d673901fb2a7e40b026c1fd9e /src/Entities/Entity.cpp | |
parent | NetherPortalScanner: Fixed type conversion warnings. (diff) | |
parent | Added documentation for HOOK_KILLED (diff) | |
download | cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar.gz cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar.bz2 cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar.lz cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar.xz cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.tar.zst cuberite-ce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 108f79e82..500204a98 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -744,6 +744,13 @@ void cEntity::KilledBy(TakeDamageInfo & a_TDI) return; } + // If the victim is a player the hook is handled by the cPlayer class + if (!IsPlayer()) + { + AString emptystring = AString(""); + cRoot::Get()->GetPluginManager()->CallHookKilled(*this, a_TDI, emptystring); + } + // Drop loot: cItems Drops; GetDrops(Drops, a_TDI.Attacker); |