Added EntityTag to eggs for 1.9 support

This commit is contained in:
shansen 2016-03-07 21:44:58 +01:00
parent ddb945401c
commit 52037c2e7f
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import me.shansen.EggCatcher.EggCatcher;
import me.shansen.EggCatcher.EggType;
import me.shansen.EggCatcher.events.EggCaptureEvent;
import me.shansen.nbt.NbtReflection;
import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.configuration.file.FileConfiguration;
@ -255,6 +256,8 @@ public class EggCatcherEntityListener implements Listener {
ItemStack eggStack = new ItemStack(Material.MONSTER_EGG, 1, eggType.getCreatureId());
eggStack = NbtReflection.setNewEntityTag(eggStack, entity.getType().getName());
String customName = ((LivingEntity) entity).getCustomName();
if (customName != null) {