Added EntityTag to eggs for 1.9 support
This commit is contained in:
parent
ddb945401c
commit
52037c2e7f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue