diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index e28ddc3f8..ac5207638 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -310,8 +310,9 @@ public final class Settings { } private static String loadEmailText() { - if (!EMAIL_FILE.exists()) - saveDefaultEmailText(); + if (!EMAIL_FILE.exists()) { + plugin.saveResource("email.html", false); + } StringBuilder str = new StringBuilder(); try { BufferedReader in = new BufferedReader(new FileReader(EMAIL_FILE)); @@ -324,21 +325,6 @@ public final class Settings { return str.toString(); } - private static void saveDefaultEmailText() { - InputStream file = plugin.getResource("email.html"); - StringBuilder str = new StringBuilder(); - try { - BufferedReader in = new BufferedReader(new InputStreamReader(file, Charset.forName("utf-8"))); - String s; - while ((s = in.readLine()) != null) - str.append(s); - in.close(); - Files.touch(EMAIL_FILE); - Files.write(str.toString(), EMAIL_FILE, Charsets.UTF_8); - } catch (Exception ignored) { - } - } - /** * * @param key the key to set