diff options
author | md_5 <md_5@bigpond.com> | 2013-01-04 13:49:45 +1100 |
---|---|---|
committer | md_5 <md_5@bigpond.com> | 2013-01-04 13:49:45 +1100 |
commit | ef8bd3422ae8c580434fd93a060b1f8287799c68 (patch) | |
tree | 7e5de23ecde667ab1b6a088cbf5362531212c592 | |
parent | 2232d859fd74fcbf9c86b705ffb5432d0ed7562b (diff) | |
download | Essentials-ef8bd3422ae8c580434fd93a060b1f8287799c68.tar Essentials-ef8bd3422ae8c580434fd93a060b1f8287799c68.tar.gz Essentials-ef8bd3422ae8c580434fd93a060b1f8287799c68.tar.lz Essentials-ef8bd3422ae8c580434fd93a060b1f8287799c68.tar.xz Essentials-ef8bd3422ae8c580434fd93a060b1f8287799c68.zip |
ArrayList, I choose you! (Fixes CraftBook erroring when the killall command is used and custom drops are enabled in that plugin)
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkillall.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java index 380369f35..243fa53ef 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Mob; +import java.util.ArrayList; import java.util.Collections; import java.util.Locale; import org.bukkit.Chunk; @@ -10,6 +11,7 @@ import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.*; import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.inventory.ItemStack; public class Commandkillall extends EssentialsCommand @@ -120,7 +122,7 @@ public class Commandkillall extends EssentialsCommand { if (entity instanceof Animals || entity instanceof NPC || entity instanceof Snowman || entity instanceof WaterMob) { - 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++; @@ -130,7 +132,7 @@ public class Commandkillall extends EssentialsCommand { if (entity instanceof Monster || entity instanceof ComplexLivingEntity || entity instanceof Flying || entity instanceof Slime) { - 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++; |