public class EntityUtils extends Object
Constructor and Description |
---|
EntityUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
applyPotionEffectWithIntensity(org.bukkit.potion.PotionEffect effect,
org.bukkit.entity.LivingEntity target,
double instantIntensity,
double durationIntensity)
Applies a potion effect with an intensity ranging from 0.0 for no effect to 1.0 for full
effect.
|
static boolean |
heal(org.bukkit.entity.LivingEntity target,
double amount,
org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason reason)
Heals an entity by a specific amount.
|
public static boolean heal(org.bukkit.entity.LivingEntity target, double amount, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason reason)
target
- the entity to healamount
- the amount of health to regainreason
- the reason supplied to the EntityRegainHealthEvent
public static void applyPotionEffectWithIntensity(org.bukkit.potion.PotionEffect effect, org.bukkit.entity.LivingEntity target, double instantIntensity, double durationIntensity)
PotionEffectType.HEAL
and PotionEffectType.HARM
, and negative intensity
has no effect.effect
- the effecttarget
- the target to apply the effect toinstantIntensity
- the intensity multiplier if the effect is instantaneousdurationIntensity
- the duration multiplier if the effect has a durationCopyright © 2021. All rights reserved.