@SuppressWarnings("deprecation")
	public void convertBook(Player player) {
		// PUT THIS INTO EVERY METHOD
		PluginDescriptionFile pdfFile = plugin.getDescription();
		String cmdFormat = "[" + pdfFile.getName() + "] ";
		// --------------------------

		// This function will check if the player
		// holds a book, and then it will check
		// if it is a valid cmdBook

		// Get the item the player has in his hand
		ItemStack is = player.getItemInHand();
		BookMeta book = (BookMeta) is.getItemMeta();

		// Check if the player is holding a book
		if (is.getTypeId() == 387) {
			// Player is holding a book
			// Now check if it is a cmdBook
			List<String> pageContent = book.getPages();

			// Now read author
			String authorPlugin = (ChatColor.RED + "cmdBook").toString(); // The
																			// cmdBook
			// author
			try {
				if (pageContent.get(0).toLowerCase().startsWith("[cmdbook]")
						& (book.getAuthor().equalsIgnoreCase(authorPlugin) || player
								.hasPermission("cmdbook.public.all"))) {
					// It is a cmdBook
					// Now check if the player has permission
					// to execute that
					if (player.hasPermission("cmdbook.convert")) {
						// Player has permisions
						// Unsign the book
						is = player.getItemInHand();
						book = (BookMeta) is.getItemMeta();
						// Check every page
						for (int i = 0; i < pageContent.toArray().length; i++) {
							ScriptEngineManager mgr = new ScriptEngineManager();
							ScriptEngine engine = mgr
									.getEngineByName("javascript");
							Pattern regex = Pattern.compile("calc\\((.*?)\\)");
							Matcher regexMatcher = regex.matcher(pageContent
									.get(i));
							while (regexMatcher.find()) {
								for (int x = 1; x <= regexMatcher.groupCount(); x++) {
									try {
										// matched text: regexMatcher.group(i)
										// match start: regexMatcher.start(i)
										// match end: regexMatcher.end(i)
										engine.getBindings(ScriptContext.ENGINE_SCOPE);
										book.setPage(
												i + 1,
												pageContent
														.get(i)
														.replace(
																"calc("
																		+ regexMatcher
																				.group(x)
																				.toString()
																		+ ")",
																"$calc["
																		+ regexMatcher
																				.group(x)
																		+ "]"));
									} catch (Exception ex) {
										ex.printStackTrace();
									}
								}
							}
						}
						is.setItemMeta(book);
						// Book unsigned
						this.logger.info(cmdFormat + player.getName()
								+ " converted the cmdBook!");
						player.sendMessage(chatColor
								.stringtodata(confirm_converted));
					} else {
						// No permission
						player.sendMessage(chatColor
								.stringtodata(error_permission));
					}
				}
			} catch (Exception ex) {
				// The player in not holding a book
				player.sendMessage(chatColor.stringtodata(error_nobook));
				return;
			}
		} else {
			// The player in not holding a book
			player.sendMessage(chatColor.stringtodata(error_nobook));
			return;
		}
	}