Fix for entity armor.

This commit is contained in:
Brianna O'Keefe 2019-02-25 09:23:41 -05:00
parent ec8dc5b16f
commit 1b40bcb3a5
2 changed files with 4 additions and 1 deletions

View File

@ -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());
}
}

View File

@ -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"))