From 6a99d8c412ab33930edd7e78b760510b7ebe3fab Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Mon, 7 Mar 2011 15:59:10 +0000 Subject: [PATCH] Implemented LivingEntity.damage --- .../org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 299102f7f1..c6e478f9e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -163,4 +163,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setMaximumAir(int ticks) { getHandle().maxAirTicks = ticks; } + + public void damage(int amount) { + entity.a((Entity)null, amount); + } + + public void damage(int amount, org.bukkit.entity.Entity source) { + entity.a(((CraftEntity)source).getHandle(), amount); + } }