diff --git a/Essentials/src/main/java/com/earth2me/essentials/config/EssentialsUserConfiguration.java b/Essentials/src/main/java/com/earth2me/essentials/config/EssentialsUserConfiguration.java index eac64cc19ed..c8277e242de 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/config/EssentialsUserConfiguration.java +++ b/Essentials/src/main/java/com/earth2me/essentials/config/EssentialsUserConfiguration.java @@ -34,6 +34,9 @@ public void setUsername(final String username) { @Override public boolean legacyFileExists() { + if (username == null) { + return false; + } return new File(configFile.getParentFile(), username + ".yml").exists(); } @@ -57,7 +60,7 @@ private File getAltFile() { @Override public boolean altFileExists() { - if (username.equals(username.toLowerCase())) { + if (username == null || username.equals(username.toLowerCase())) { return false; } return getAltFile().exists();