/* * Villager specific methods */ public static Villager SpawnVillager(World world, Location loc, String name) { if (EpicSystem.useCitizens()) return null; // Check if villager exists if (GetEntity(world, name) != null) { RemoveVillager(world, name); } // Set properties Villager villager = (Villager) world.spawnEntity(loc, EntityType.VILLAGER); villager.setCustomName(name); villager.setCustomNameVisible(true); villager.setAgeLock(true); villager.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1000000000, 100000000)); villager.setCanPickupItems(false); QuestEntity epicVillager = new QuestEntity(villager); epicVillager.originalLocation = loc; entityList.put(villager, epicVillager); return villager; }
public String toString() { return QuestEntity.zzb(this); }
public boolean equals(Object obj) { return QuestEntity.zza(this, obj); }
public int hashCode() { return QuestEntity.zza(this); }