@Override
	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
		if (cmd.getName().equalsIgnoreCase("giveleash") && args.length == 1) {
			if (!(sender instanceof Player)) {
				sender.sendMessage("This command can only be run by a player.");
			} else {
				@SuppressWarnings("deprecation")
				Player player = server.getPlayer(args[0]);
				if (!sender.isOp() || player == null || !player.isOnline())
					return false;
				try {
					Chicken  c = (Chicken)player.getWorld().spawnEntity(player.getLocation(), EntityType.CHICKEN);
				c.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE,9999,true));
				c.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE,255,true));
				NPCRegistry registry = CitizensAPI.getNPCRegistry();
				NPC npc = registry.createNPC(EntityType.VILLAGER,"");
				
				npc.spawn(player.getLocation());
				((Villager)npc.getEntity()).setProfession(Profession.PRIEST);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

			}
			return true;
		}
		return false;
	}