1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-02-24 16:32:35 +01:00

Might be worth catching other occurances of the event too.

This commit is contained in:
md_5 2013-01-04 13:53:01 +11:00
parent 64c37cd900
commit 9745984904

View File

@ -111,7 +111,7 @@ public class Commandkillall extends EssentialsCommand
continue;
}
}
if(entity instanceof Ocelot)
if (entity instanceof Ocelot)
{
if (((Ocelot)entity).isTamed())
{
@ -140,14 +140,14 @@ public class Commandkillall extends EssentialsCommand
}
else if (all)
{
EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST);
EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, new ArrayList<ItemStack>(0));
ess.getServer().getPluginManager().callEvent(event);
entity.remove();
numKills++;
}
else if (entityClass != null && entityClass.isAssignableFrom(entity.getClass()))
{
EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, Collections.EMPTY_LIST);
EntityDeathEvent event = new EntityDeathEvent((LivingEntity)entity, new ArrayList<ItemStack>(0));
ess.getServer().getPluginManager().callEvent(event);
entity.remove();
numKills++;