From c8afea20c6d47b25281b68e6638653a8be28e709 Mon Sep 17 00:00:00 2001 From: Brianna O'Keefe Date: Thu, 21 Feb 2019 10:11:09 -0500 Subject: [PATCH] epicspawners drop support. --- .../java/com/songoda/ultimatestacker/utils/Methods.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/ultimatestacker/utils/Methods.java b/src/main/java/com/songoda/ultimatestacker/utils/Methods.java index f9aa244..7d00760 100644 --- a/src/main/java/com/songoda/ultimatestacker/utils/Methods.java +++ b/src/main/java/com/songoda/ultimatestacker/utils/Methods.java @@ -10,6 +10,7 @@ import org.bukkit.entity.*; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BlockStateMeta; import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.metadata.FixedMetadataValue; import java.util.Arrays; import java.util.HashMap; @@ -39,6 +40,11 @@ public class Methods { } } else { Entity newEntity = newEntity(killed); + + if (Bukkit.getPluginManager().isPluginEnabled("EpicSpawners")) + if (killed.hasMetadata("ES")) newEntity.setMetadata("ES", + new FixedMetadataValue(com.songoda.epicspawners.EpicSpawnersPlugin.getInstance(), "ES")); + stack = stackManager.updateStack(killed, newEntity); stack.addAmount(-1); @@ -60,7 +66,7 @@ public class Methods { } else if (killed instanceof Villager) { ((Villager) newEntity).setProfession(((Villager) killed).getProfession()); } else if (killed instanceof Slime) { - ((Slime)newEntity).setSize(((Slime)killed).getSize());; + ((Slime)newEntity).setSize(((Slime)killed).getSize()); } newEntity.setFireTicks(killed.getFireTicks());