org.bukkit.event.entity
Class EntityDeathEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.entity.EntityEvent
          extended by org.bukkit.event.entity.EntityDeathEvent
Direct Known Subclasses:
PlayerDeathEvent

public class EntityDeathEvent
extends EntityEvent

Thrown whenever a LivingEntity dies


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
 
Constructor Summary
EntityDeathEvent(LivingEntity entity, List<ItemStack> drops)
           
EntityDeathEvent(LivingEntity what, List<ItemStack> drops, int droppedExp)
           
 
Method Summary
 int getDroppedExp()
          Gets how much EXP should be dropped from this death.
 List<ItemStack> getDrops()
          Gets all the items which will drop when the entity dies
 LivingEntity getEntity()
          Returns the Entity involved in this event
static HandlerList getHandlerList()
           
 HandlerList getHandlers()
           
 void setDroppedExp(int exp)
          Sets how much EXP should be dropped from this death.
 
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntityType
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityDeathEvent

public EntityDeathEvent(LivingEntity entity,
                        List<ItemStack> drops)

EntityDeathEvent

public EntityDeathEvent(LivingEntity what,
                        List<ItemStack> drops,
                        int droppedExp)
Method Detail

getEntity

public LivingEntity getEntity()
Description copied from class: EntityEvent
Returns the Entity involved in this event

Overrides:
getEntity in class EntityEvent
Returns:
Entity who is involved in this event

getDroppedExp

public 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.

setDroppedExp

public 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.

getDrops

public List<ItemStack> getDrops()
Gets all the items which will drop when the entity dies

Returns:
Items to drop when the entity dies

getHandlers

public HandlerList getHandlers()
Specified by:
getHandlers in class Event

getHandlerList

public static HandlerList getHandlerList()


Copyright © 2013. All Rights Reserved.