public static HumanNPC spawnNPC(final Location loc, CreatureNPCType type) {
try {
String name = type.chooseRandomName();
World ws = getWorldServer(loc.getWorld());
final CraftNPC eh = type.getEntityConstructor().newInstance(getMinecraftServer(ws.getServer()), ws, name,
new PlayerInteractManager(ws));
eh.setPositionRotation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
Bukkit.getScheduler().scheduleSyncDelayedTask(Citizens.plugin, new Runnable() {
@Override
public void run() {
eh.aA = loc.getYaw();