public static boolean integrate(final Plugin plugin) {

        File pluginDir = plugin.getDataFolder().getParentFile();

        if (!Bukkit.getPluginManager().isPluginEnabled(PLUGIN_NAME)) {
            // This is the installation confirmation file
            File autoinstallConfigFile = new File(pluginDir + "/" + PLUGIN_NAME + "/" + "autoinstall.yml");

            try {
                // If no installation confirmation file exists yet, create a new one
                if (!autoinstallConfigFile.exists()) {
                    autoinstallConfigFile.getParentFile().mkdirs();
                    autoinstallConfigFile.createNewFile();
                }

                // Read the installation confirmation file
                YamlConfiguration autoinstallConfig = YamlConfiguration.loadConfiguration(autoinstallConfigFile);
                List<String> requiringPlugins = autoinstallConfig.getStringList(PLUGIN_NAME + "-requiring-plugins");

                // If the plugin which is currently integrating is present in the file, it must have written its name into it last time this method was called
                // Therefore, we can assume that the user restarted the server after reviewing the info message
                // That means that we are free to install the main plugin
                if (requiringPlugins.contains(plugin.getName())) {
                    autoinstallConfigFile.delete();
                    install(pluginDir);
                    return true;
                }
                // Otherwise, this is the first time the user starts up the server with a QuarterBukkit-requiring plugin
                // In that case, add the plugin's name to the file and wait for a restart
                else {
                    requiringPlugins.add(plugin.getName());
                    autoinstallConfig.set(PLUGIN_NAME + "-requiring-plugins", requiringPlugins);
                    autoinstallConfig.save(autoinstallConfigFile);
                }

                // Notify the user of the need to install QuarterBukkit and wait until restart
                // Schedule with a non-bukkit timer because the integrating plugin might become disabled
                new Timer().schedule(new TimerTask() {

                    @Override
                    public void run() {

                        Bukkit.broadcastMessage(ChatColor.RED + "" + plugin.getName() + " requires " + PLUGIN_NAME + ". Please " + ChatColor.DARK_AQUA + "restart" + ChatColor.RED + " the server to automatically install it.");
                    }

                }, 0, 5 * 1000);
            } catch (UnknownHostException e) {
                Bukkit.getLogger().warning("Can't connect to dev.bukkit.org for installing " + PLUGIN_NAME + "!");
            } catch (Exception e) {
                Bukkit.getLogger().log(Level.SEVERE, "An error occurred while installing " + PLUGIN_NAME, e);
            }

            return false;
        } else {
            return true;
        }
    }