diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-03-07 15:59:10 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-03-07 15:59:10 +0000 |
commit | 6a99d8c412ab33930edd7e78b760510b7ebe3fab (patch) | |
tree | 318bf9b6d225b2f2bf9234b7fb7196cf736fed2c /src | |
parent | 03fae0a2f757cfd627388ecb631d8f8f393237e4 (diff) | |
download | craftbukkit-6a99d8c412ab33930edd7e78b760510b7ebe3fab.tar craftbukkit-6a99d8c412ab33930edd7e78b760510b7ebe3fab.tar.gz craftbukkit-6a99d8c412ab33930edd7e78b760510b7ebe3fab.tar.lz craftbukkit-6a99d8c412ab33930edd7e78b760510b7ebe3fab.tar.xz craftbukkit-6a99d8c412ab33930edd7e78b760510b7ebe3fab.zip |
Implemented LivingEntity.damage
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 299102f7..c6e478f9 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); + } } |