diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-29 08:09:22 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-19 20:23:27 -0800 |
commit | 0c203874e8c943191b657b3c3f1be7fd64719cd1 (patch) | |
tree | d3f0bbe4b482236578b7bb9134e8a336b3d745a2 | |
parent | ea427c302670d21b908c967266fc4ac10b848661 (diff) | |
download | bukkit-0c203874e8c943191b657b3c3f1be7fd64719cd1.tar bukkit-0c203874e8c943191b657b3c3f1be7fd64719cd1.tar.gz bukkit-0c203874e8c943191b657b3c3f1be7fd64719cd1.tar.lz bukkit-0c203874e8c943191b657b3c3f1be7fd64719cd1.tar.xz bukkit-0c203874e8c943191b657b3c3f1be7fd64719cd1.zip |
Added getMaxHealth to LivingEntity
-rw-r--r-- | src/main/java/org/bukkit/entity/LivingEntity.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 2bc90bef..09f532f5 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -12,18 +12,26 @@ import org.bukkit.block.Block; public interface LivingEntity extends Entity { /** - * Gets the entity's health from 0-20, where 0 is dead and 20 is full + * Gets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead * - * @return Health represented from 0-20 + * @return Health represented from 0 to max */ public int getHealth(); /** - * Sets the entity's health from 0-20, where 0 is dead and 20 is full + * Sets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead * - * @param health New health represented from 0-20 + * @param health New health represented from 0 to max + * @throws IllegalArgumentException Thrown if the health is < 0 or > max */ public void setHealth(int health); + + /** + * Gets the maximum health this entity may have + * + * @return Maximum health + */ + public int getMaxHealth(); /** * Gets the height of the entity's head above its Location |