mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-30 11:11:22 +01:00
Fixed dropping too much armor.
This commit is contained in:
parent
fe52eba7da
commit
7c10e08c9a
@ -24,8 +24,10 @@ public class Methods {
|
||||
Location killedLocation = killed.getLocation();
|
||||
for (int i = 1; i < stack.getAmount(); i++) {
|
||||
if (i == 1) {
|
||||
if (killed.getType() != EntityType.PIG_ZOMBIE)
|
||||
items.removeIf(it -> it.isSimilar(killed.getEquipment().getItemInHand()));
|
||||
items.removeIf(it -> it.isSimilar(killed.getEquipment().getItemInHand()));
|
||||
for (ItemStack item : killed.getEquipment().getArmorContents()) {
|
||||
items.removeIf(it -> it.isSimilar(item));
|
||||
}
|
||||
}
|
||||
for (ItemStack item : items) {
|
||||
killedLocation.getWorld().dropItemNaturally(killedLocation, item);
|
||||
@ -40,8 +42,10 @@ public class Methods {
|
||||
EntityStackManager stackManager = instance.getEntityStackManager();
|
||||
Entity newEntity = newEntity(killed);
|
||||
|
||||
if (killed.getType() != EntityType.PIG_ZOMBIE)
|
||||
((LivingEntity) newEntity).getEquipment().clear();
|
||||
((LivingEntity) newEntity).getEquipment().clear();
|
||||
|
||||
if (killed.getType() == EntityType.PIG_ZOMBIE)
|
||||
((LivingEntity) newEntity).getEquipment().setItemInHand(new ItemStack(Material.GOLD_SWORD));
|
||||
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("EpicSpawners"))
|
||||
if (killed.hasMetadata("ES"))
|
||||
|
Loading…
Reference in New Issue
Block a user