mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-12 22:19:07 +00:00
Might be worth catching other occurances of the event too.
This commit is contained in:
parent
ef8bd3422a
commit
121f09caf0
|
@ -111,7 +111,7 @@ public class Commandkillall extends EssentialsCommand
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(entity instanceof Ocelot)
|
if (entity instanceof Ocelot)
|
||||||
{
|
{
|
||||||
if (((Ocelot)entity).isTamed())
|
if (((Ocelot)entity).isTamed())
|
||||||
{
|
{
|
||||||
|
@ -140,14 +140,14 @@ public class Commandkillall extends EssentialsCommand
|
||||||
}
|
}
|
||||||
else if (all)
|
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);
|
ess.getServer().getPluginManager().callEvent(event);
|
||||||
entity.remove();
|
entity.remove();
|
||||||
numKills++;
|
numKills++;
|
||||||
}
|
}
|
||||||
else if (entityClass != null && entityClass.isAssignableFrom(entity.getClass()))
|
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);
|
ess.getServer().getPluginManager().callEvent(event);
|
||||||
entity.remove();
|
entity.remove();
|
||||||
numKills++;
|
numKills++;
|
||||||
|
|
Loading…
Reference in a new issue