From 44552721322fca2e7bc7d2aeba3162bf4a4079b3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 24 Mar 2011 00:32:41 +0100 Subject: [PATCH] Implementation of LivingEntity maximumNoDamageTicks, noDamageTicks, lastDamage By: Erik Broes --- .../craftbukkit/entity/CraftLivingEntity.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 51a6c91b48..812e82970b 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -179,4 +179,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { loc.setY(loc.getY() + getEyeHeight()); return loc; } + + public int getMaximumNoDamageTicks() { + return getHandle().maxNoDamageTicks; + } + + public void setMaximumNoDamageTicks(int ticks) { + getHandle().maxNoDamageTicks = ticks; + } + + public int getLastDamage() { + return getHandle().lastDamage; + } + + public void setLastDamage(int damage) { + getHandle().lastDamage = damage; + } + + public int getNoDamageTicks() { + return getHandle().noDamageTicks; + } + + public void setNoDamageTicks(int ticks) { + getHandle().noDamageTicks = ticks; + } }