diff --git a/src/main/java/com/songoda/ultimatestacker/events/DeathListeners.java b/src/main/java/com/songoda/ultimatestacker/events/DeathListeners.java index 4b16e81..fb80b0c 100644 --- a/src/main/java/com/songoda/ultimatestacker/events/DeathListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/events/DeathListeners.java @@ -11,6 +11,8 @@ import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.metadata.FixedMetadataValue; +import java.util.ArrayList; + public class DeathListeners implements Listener { private final UltimateStacker instance; @@ -21,6 +23,6 @@ public class DeathListeners implements Listener { @EventHandler public void onEntityDeath(EntityDeathEvent event) { - Methods.onDeath(event.getEntity(), event.getDrops(), event.getDroppedExp()); + Methods.onDeath(event.getEntity(), new ArrayList<>(event.getDrops()), event.getDroppedExp()); } } diff --git a/src/main/java/com/songoda/ultimatestacker/utils/Methods.java b/src/main/java/com/songoda/ultimatestacker/utils/Methods.java index afd65e5..504548d 100644 --- a/src/main/java/com/songoda/ultimatestacker/utils/Methods.java +++ b/src/main/java/com/songoda/ultimatestacker/utils/Methods.java @@ -34,6 +34,7 @@ public class Methods { UltimateStacker instance = UltimateStacker.getInstance(); EntityStackManager stackManager = instance.getEntityStackManager(); Entity newEntity = newEntity(killed); + ((LivingEntity) newEntity).getEquipment().clear(); if (Bukkit.getPluginManager().isPluginEnabled("EpicSpawners")) if (killed.hasMetadata("ES"))