ENTITY_DEATH

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-01-27 13:25:20 +00:00
parent a079602347
commit b26b68a61a
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
package org.bukkit.event.entity;
import java.util.List;
import org.bukkit.entity.Entity;
import org.bukkit.inventory.ItemStack;
/**
* Thrown whenever a LivingEntity dies
*/
public class EntityDeathEvent extends EntityEvent {
private List<ItemStack> drops;
public EntityDeathEvent(final Type type, final Entity what, final List<ItemStack> drops) {
super(type, what);
this.drops = drops;
}
/**
* Sets what items will be dropped when this entity dies
*
* @param drops Items to drop when the entity dies
*/
public void setDrops(final List<ItemStack> drops) {
this.drops = drops;
}
/**
* Gets all the items which will drop when the entity dies
*
* @return Items to drop when the entity dies
*/
public List<ItemStack> getDrops() {
return drops;
}
}

View File

@@ -29,4 +29,7 @@ public class EntityListener implements Listener {
public void onEntityTarget(EntityTargetEvent event) {
}
public void onEntityDeath(EntityDeathEvent event) {
}
}