public static boolean createDefaultConfiguration(File destination, String defaultName, boolean replace) {
        Validate.notNull(destination, "destination can not be null.");
        Validate.notNull(defaultName, "defaultName can not be null.");

        PlayerNamesPlugin plugin = PlayerNamesPlugin.getInstance();

        // Make parent directories
        File parent = destination.getParentFile();

        if (!parent.exists()) {
            parent.mkdirs();
        }

        if (!replace && destination.exists()) {
            return false;
        }

        InputStream input = null;
        try {
            JarFile file = new JarFile(plugin.getPluginFile());
            ZipEntry copy = file.getEntry("defaults/" + defaultName);
            if (copy == null) {
                throw new FileNotFoundException();
            }
            input = file.getInputStream(copy);
        } catch (IOException e) {
            plugin.getLogger().severe("Unable to read default configuration: " + defaultName);
        }

        boolean created = false;
        if (input != null) {

            try (FileOutputStream output = new FileOutputStream(destination)) {
                byte[] buf = new byte[8192];
                int length;
                while ((length = input.read(buf)) > 0) {
                    output.write(buf, 0, length);
                }

                plugin.getLogger().info("Default configuration file written: " + destination.getAbsolutePath());
                created = true;
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    input.close();
                } catch (IOException ignore) {
                }
            }
        }
        return created;
    }