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
|
setEntity
public 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 EntityEvent
public boolean isIgnored()
isIgnored
in interface Cancellable
isIgnored
in class EntityEvent
public void cancel(boolean cancelled)
cancel
in interface Cancellable
cancel
in class EntityEvent
cancelled
- set the cancellation state of the eventCopyright © 2016. All rights reserved.