From 188c435e67b596f56cd5fcf511026449120b38c8 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 4 Feb 2011 01:01:48 +0100 Subject: [PATCH] Added damage(int) and damage(int, Entity) for LivingEntity By: Forsaken --- .../main/java/org/bukkit/entity/LivingEntity.java | 15 +++++++++++++++ 1 file changed, 15 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 cdcf59c14e..97cd6281aa 100644 --- a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java @@ -135,4 +135,19 @@ public interface LivingEntity extends Entity { * @param ticks Maximum amount of air */ public void setMaximumAir(int ticks); + + /** + * Deals the given amount of damage to this entity + * + * @param amount Amount of damage to deal + */ + public void damage(int amount); + + /** + * Deals the given amount of damage to this entity, from a specified entity + * + * @param amount Amount of damage to deal + * @param source Entity which to attribute this damage from + */ + public void damage(int amount, Entity source); }