diff --git a/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java b/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java index cac9fbf..d377ba4 100644 --- a/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java +++ b/src/main/java/com/songoda/ultimatestacker/stackable/entity/EntityStack.java @@ -1,5 +1,6 @@ package com.songoda.ultimatestacker.stackable.entity; +import com.google.common.base.Throwables; import com.songoda.core.compatibility.ServerVersion; import com.songoda.core.lootables.loot.Drop; import com.songoda.core.lootables.loot.DropUtils; @@ -94,7 +95,6 @@ public class EntityStack extends ColdEntityStack { } private void handleWholeStackDeath(LivingEntity killed, List drops, boolean custom, int droppedExp, EntityDeathEvent event) { - plugin.getEntityStackManager().removeStack(event.getEntity()); plugin.getDataManager().deleteHost(this); List preStackedDrops = new ArrayList<>(); @@ -124,6 +124,7 @@ public class EntityStack extends ColdEntityStack { if (killed.getKiller() == null) return; plugin.addExp(killed.getKiller(), this); + plugin.getEntityStackManager().removeStack(event.getEntity()); } private void handleSingleStackDeath(LivingEntity killed, List drops, int droppedExp, EntityDeathEvent event) {