From c98c24589017d676498f61705ae35d05fe89348b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 11 Dec 2011 16:04:37 +0000 Subject: [PATCH] Added getKiller() method to LivingEntity, to determine the killer of an entity By: Nathan Adams --- .../src/main/java/org/bukkit/entity/LivingEntity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java index 09f532f539..94504bcf52 100644 --- a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java @@ -215,4 +215,12 @@ public interface LivingEntity extends Entity { */ public void setNoDamageTicks(int ticks); + /** + * Gets the player identified as the killer of this entity. + *

+ * May be null. + * + * @return Killer player, or null if none found. + */ + public Player getKiller(); }