diff --git a/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java b/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java index c340326f7..4c80276d3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java @@ -25,6 +25,9 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Skeleton; +import org.bukkit.entity.Slime; +import org.bukkit.entity.Villager; +import org.bukkit.entity.Zombie; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityCombustEvent; @@ -298,9 +301,6 @@ public class NpcManager extends MiniPlugin { LivingEntity entity = (LivingEntity) _creature.SpawnEntity(npc.getLocation(), EntityType.valueOf(npc.getDatabaseRecord().getEntityType())); - if (entity instanceof Skeleton && npc.getDatabaseRecord().getEntityMeta() != null) - ((Skeleton) entity).setSkeletonType(Skeleton.SkeletonType.valueOf(npc.getDatabaseRecord().getEntityMeta().toUpperCase())); - entity.setCustomNameVisible(true); if (npc.getDatabaseRecord().getName() != null) { @@ -326,6 +326,14 @@ public class NpcManager extends MiniPlugin ((Ageable) entity).setAgeLock(true); } + if (entity instanceof Zombie) + ((Zombie) entity).setBaby(!npc.getDatabaseRecord().getAdult()); + if (entity instanceof Slime && npc.getDatabaseRecord().getEntityMeta() != null) + ((Slime) entity).setSize(Integer.parseInt(npc.getDatabaseRecord().getEntityMeta())); + if (entity instanceof Skeleton && npc.getDatabaseRecord().getEntityMeta() != null) + ((Skeleton) entity).setSkeletonType(Skeleton.SkeletonType.valueOf(npc.getDatabaseRecord().getEntityMeta().toUpperCase())); + if (entity instanceof Villager && npc.getDatabaseRecord().getEntityMeta() != null) + ((Villager) entity).setProfession(Villager.Profession.valueOf(npc.getDatabaseRecord().getEntityMeta().toUpperCase())); if (entity instanceof org.bukkit.entity.Creature) ((org.bukkit.entity.Creature) entity).setTarget(null);