summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-06-13 12:59:07 +0200
committerAlexander Harkness <me@bearbin.net>2015-06-13 12:59:07 +0200
commitce93cfc34c85ef34e7a7d52b65fccfe9dcaf7537 (patch)
treeade44b9828d0146d673901fb2a7e40b026c1fd9e /src/Entities/Entity.cpp
parentNetherPortalScanner: Fixed type conversion warnings. (diff)
parentAdded documentation for HOOK_KILLED (diff)
downloadcuberite-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.cpp7
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);