Package ch.njol.skript.bukkitutil
Class HealthUtils
java.lang.Object
ch.njol.skript.bukkitutil.HealthUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddamage(Damageable e, double d) Apply damage to an entitystatic doublestatic doublestatic doubleGet the health of an entitystatic doubleGet the max health an entity hasstatic voidheal(Damageable e, double h) Heal an entitystatic voidresetMaxHealth(Damageable entity) Reset max health of an entitystatic voidsetDamage(EntityDamageEvent event, double damage) static voidstatic voidsetHealth(Damageable e, double health) Set the health of an entitystatic voidsetMaxHealth(Damageable e, double health) Set the max health an entity can have
-
Constructor Details
-
HealthUtils
public HealthUtils()
-
-
Method Details
-
getHealth
Get the health of an entity- Parameters:
e- Entity to get health from- Returns:
- The amount of hearts the entity has left
-
setHealth
Set the health of an entity- Parameters:
e- Entity to set health forhealth- The amount of hearts to set
-
getMaxHealth
Get the max health an entity has- Parameters:
e- Entity to get max health from- Returns:
- How many hearts the entity can have at most
-
setMaxHealth
Set the max health an entity can have- Parameters:
e- Entity to set max health forhealth- How many hearts the entity can have at most
-
resetMaxHealth
Reset max health of an entity- Parameters:
entity- Entity to reset max health
-
damage
Apply damage to an entity- Parameters:
e- Entity to apply damage tod- Amount of hearts to damage
-
heal
Heal an entity- Parameters:
e- Entity to healh- Amount of hearts to heal
-
getDamage
-
getFinalDamage
-
setDamage
-
setDamageCause
-