diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-03-24 00:31:59 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-03-24 00:31:59 +0100 |
commit | c1d9eac987fca89cae0b50eb926ad44ff72f3c35 (patch) | |
tree | 5e2bbe9e2f379fd2dcab14da758b7631efdd395a /src/main | |
parent | 0ede0ca8756587f1dc0d960e035a140ed9d93729 (diff) | |
download | bukkit-c1d9eac987fca89cae0b50eb926ad44ff72f3c35.tar bukkit-c1d9eac987fca89cae0b50eb926ad44ff72f3c35.tar.gz bukkit-c1d9eac987fca89cae0b50eb926ad44ff72f3c35.tar.lz bukkit-c1d9eac987fca89cae0b50eb926ad44ff72f3c35.tar.xz bukkit-c1d9eac987fca89cae0b50eb926ad44ff72f3c35.zip |
Long overdue LivingEntity maximumNoDamageTicks, noDamageTicks, lastDamage
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/entity/LivingEntity.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index f9b221ee..9fea43f5 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -159,4 +159,51 @@ public interface LivingEntity extends Entity { * @param source Entity which to attribute this damage from */ public void damage(int amount, Entity source); + + /** + * Returns the entities current maximum noDamageTicks + * This is the time in ticks the entity will become unable to take + * equal or less damage than the lastDamage + * + * @return noDamageTicks + */ + public int getMaximumNoDamageTicks(); + + /** + * Sets the entities current maximum noDamageTicks + * + * @param ticks maximumNoDamageTicks + */ + public void setMaximumNoDamageTicks(int ticks); + + /** + * Returns the entities lastDamage taken in the current noDamageTicks time. + * Only damage higher than this amount will further damage the entity. + * + * @return lastDamage + */ + public int getLastDamage(); + + /** + * Sets the entities current maximum noDamageTicks + * + * @param damage last damage + */ + public void setLastDamage(int damage); + + /** + * Returns the entities current noDamageTicks + * + * @return noDamageTicks + */ + public int getNoDamageTicks(); + + /** + * Sets the entities current noDamageTicks + * + * @param ticks NoDamageTicks + */ + public void setNoDamageTicks(int ticks); + + } |