public void generate(String title, String prefix, ChatColor mainColor, ChatColor titleColor, ChatColor pageColor){
		MenuFactory menufactory = new MenuFactory();
		menufactory.setPrefix(ChatColor.translateAlternateColorCodes('&', prefix), false);
		menufactory.setTitle(title);
		menufactory.setColors(mainColor, titleColor, pageColor);
		menufactory.setStyle(style);

		int page = 1;
		int line = 1;

		PageFactory factory = new PageFactory();
		factory.setPageNumber(page);
		for(Line message : lines){
			if(line > 8){
				try{
					menufactory.addPage(factory.getPage());
				}catch(PageAlreadyExistsException e){
					e.printStackTrace();
				}catch(InvalidPageException e){
					e.printStackTrace();
				}
				factory = new PageFactory();
				page++;
				factory.setPageNumber(page);
				line = 1;
			}
			factory.setLine(line, message);
			line++;
		}
		pages = page;
		try{
			menufactory.addPage(factory.getPage());
		}catch(PageAlreadyExistsException e){
			e.printStackTrace();
		}catch(InvalidPageException e){
			e.printStackTrace();
		}

		try{
			this.menu = menufactory.getMenu();
		}catch(NoPagesException e){
			e.printStackTrace();
		}catch(InvalidMenuException e){
			e.printStackTrace();
		}
	}