Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.entity.Damageable Interface Reference
Inheritance diagram for org.bukkit.entity.Damageable:
org.bukkit.entity.Entity org.bukkit.metadata.Metadatable org.bukkit.entity.EnderDragonPart org.bukkit.entity.LivingEntity org.bukkit.entity.Ambient org.bukkit.entity.ComplexLivingEntity org.bukkit.entity.Creature org.bukkit.entity.Flying org.bukkit.entity.HumanEntity org.bukkit.entity.Slime org.bukkit.entity.Bat org.bukkit.entity.EnderDragon org.bukkit.entity.Ageable org.bukkit.entity.Golem org.bukkit.entity.Monster org.bukkit.entity.NPC org.bukkit.entity.WaterMob org.bukkit.entity.Ghast org.bukkit.entity.Player org.bukkit.entity.MagmaCube

Public Member Functions

void damage (double amount)
 
void _INVALID_damage (int amount)
 
void damage (double amount, Entity source)
 
void _INVALID_damage (int amount, Entity source)
 
double getHealth ()
 
int _INVALID_getHealth ()
 
void setHealth (double health)
 
void _INVALID_setHealth (int health)
 
double getMaxHealth ()
 
int _INVALID_getMaxHealth ()
 
void setMaxHealth (double health)
 
void _INVALID_setMaxHealth (int health)
 
void resetMaxHealth ()
 
- Public Member Functions inherited from org.bukkit.entity.Entity
Location getLocation ()
 
Location getLocation (Location loc)
 
void setVelocity (Vector velocity)
 
Vector getVelocity ()
 
boolean isOnGround ()
 
World getWorld ()
 
boolean teleport (Location location)
 
boolean teleport (Location location, TeleportCause cause)
 
boolean teleport (Entity destination)
 
boolean teleport (Entity destination, TeleportCause cause)
 
List< org.bukkit.entity.EntitygetNearbyEntities (double x, double y, double z)
 
int getEntityId ()
 
int getFireTicks ()
 
int getMaxFireTicks ()
 
void setFireTicks (int ticks)
 
void remove ()
 
boolean isDead ()
 
boolean isValid ()
 
Server getServer ()
 
abstract Entity getPassenger ()
 
abstract boolean setPassenger (Entity passenger)
 
abstract boolean isEmpty ()
 
abstract boolean eject ()
 
float getFallDistance ()
 
void setFallDistance (float distance)
 
void setLastDamageCause (EntityDamageEvent event)
 
EntityDamageEvent getLastDamageCause ()
 
UUID getUniqueId ()
 
int getTicksLived ()
 
void setTicksLived (int value)
 
void playEffect (EntityEffect type)
 
EntityType getType ()
 
boolean isInsideVehicle ()
 
boolean leaveVehicle ()
 
Entity getVehicle ()
 

Detailed Description

Represents an Entity that has health and can take damage.

Definition at line 6 of file Damageable.java.

Member Function Documentation

void org.bukkit.entity.Damageable._INVALID_damage ( int  amount)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

void org.bukkit.entity.Damageable._INVALID_damage ( int  amount,
Entity  source 
)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

int org.bukkit.entity.Damageable._INVALID_getHealth ( )

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

int org.bukkit.entity.Damageable._INVALID_getMaxHealth ( )

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

void org.bukkit.entity.Damageable._INVALID_setHealth ( int  health)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

void org.bukkit.entity.Damageable._INVALID_setMaxHealth ( int  health)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

void org.bukkit.entity.Damageable.damage ( double  amount)

Deals the given amount of damage to this entity.

Parameters
amountAmount of damage to deal
void org.bukkit.entity.Damageable.damage ( double  amount,
Entity  source 
)

Deals the given amount of damage to this entity, from a specified entity.

Parameters
amountAmount of damage to deal
sourceEntity which to attribute this damage from
double org.bukkit.entity.Damageable.getHealth ( )

Gets the entity's health from 0 to getMaxHealth(), where 0 is dead.

Returns
Health represented from 0 to max
double org.bukkit.entity.Damageable.getMaxHealth ( )

Gets the maximum health this entity has.

Returns
Maximum health
void org.bukkit.entity.Damageable.resetMaxHealth ( )

Resets the max health to the original amount.

void org.bukkit.entity.Damageable.setHealth ( double  health)

Sets the entity's health from 0 to getMaxHealth(), where 0 is dead.

Parameters
healthNew health represented from 0 to max
Exceptions
IllegalArgumentExceptionThrown if the health is < 0 or > getMaxHealth()
void org.bukkit.entity.Damageable.setMaxHealth ( double  health)

Sets the maximum health this entity can have.

If the health of the entity is above the value provided it will be set to that value.

Note: An entity with a health bar (Player, EnderDragon, Wither, etc...} will have their bar scaled accordingly.

Parameters
healthamount of health to set the maximum to

The documentation for this interface was generated from the following file: