mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Properly call EntityDeathEvent for mobs. Fixes BUKKIT-1519
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
37d14787d9
commit
66b34af562
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user