Package org.bukkit.event.entity
Class EntityDeathEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDeathEvent
- Direct Known Subclasses:
- PlayerDeathEvent
Thrown whenever a LivingEntity dies
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityDeathEvent(LivingEntity entity, DamageSource damageSource, List<ItemStack> drops) EntityDeathEvent(LivingEntity what, DamageSource damageSource, List<ItemStack> drops, int droppedExp) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the source of damage which caused the death.intGets how much EXP should be dropped from this death.getDrops()Gets all the items which will drop when the entity diesReturns the Entity involved in this eventstatic HandlerListvoidsetDroppedExp(int exp) Sets how much EXP should be dropped from this death.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
EntityDeathEventpublic EntityDeathEvent(@NotNull LivingEntity entity, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops) 
- 
EntityDeathEventpublic EntityDeathEvent(@NotNull LivingEntity what, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp) 
 
- 
- 
Method Details- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getDamageSourceGets the source of damage which caused the death.- Returns:
- a DamageSource detailing the source of the damage for the death.
 
- 
getDroppedExppublic int getDroppedExp()Gets how much EXP should be dropped from this death.This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death. - Returns:
- Amount of EXP to drop.
 
- 
setDroppedExppublic void setDroppedExp(int exp) Sets how much EXP should be dropped from this death.This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death. - Parameters:
- exp- Amount of EXP to drop.
 
- 
getDropsGets all the items which will drop when the entity dies- Returns:
- Items to drop when the entity dies
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-