Properly call EntityDeathEvent for mobs. Fixes BUKKIT-1519

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot 2012-04-15 09:16:43 -05:00
parent 37d14787d9
commit 66b34af562

View File

@ -1,6 +1,7 @@
package org.bukkit.craftbukkit.event;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -287,6 +288,10 @@ public class CraftEventFactory {
return event;
}
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim) {
return callEntityDeathEvent(victim, new ArrayList<org.bukkit.inventory.ItemStack>(0));
}
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());