public class EntityDamageEvent extends EntityEvent
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityDamageEvent.Cause
The cause of a damage event
|
| Constructor and Description |
|---|
EntityDamageEvent(Entity entity,
double damage,
EntityDamageEvent.Cause cause) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(boolean cancelled) |
EntityDamageEvent.Cause |
cause() |
double |
damage() |
LivingEntity |
entity() |
boolean |
isIgnored() |
void |
setDamage(double damage)
Change the damage value dealt
|
setEntitypublic EntityDamageEvent(Entity entity, double damage, EntityDamageEvent.Cause cause)
entity - the entity associated with this eventdamage - the amount of damage dealt to the playerpublic EntityDamageEvent.Cause cause()
public double damage()
public void setDamage(double damage)
damage - the amount of damage dealtpublic LivingEntity entity()
entity in class EntityEventpublic boolean isIgnored()
isIgnored in interface CancellableisIgnored in class EntityEventpublic void cancel(boolean cancelled)
cancel in interface Cancellablecancel in class EntityEventcancelled - set the cancellation state of the eventCopyright © 2016. All rights reserved.