1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-31 04:36:33 +00:00

Fix NPE if config was null in BungeeCord module

This commit is contained in:
Redned
2019-12-02 08:27:45 -06:00
committed by GitHub
parent 3e7e34dfb9
commit 5552f34871

View File

@@ -57,13 +57,13 @@ public class GeyserBungeePlugin extends Plugin implements IGeyserBootstrap {
Files.copy(in, file.toPath());
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
} catch (IOException ex) {
geyserLogger.severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!", ex);
getLogger().severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!", ex);
return;
}
}
if (configuration == null) {
geyserLogger.severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!");
getLogger().severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!");
return;
}
@@ -74,7 +74,7 @@ public class GeyserBungeePlugin extends Plugin implements IGeyserBootstrap {
try {
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
} catch (IOException ex) {
geyserLogger.severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!", ex);
getLogger().severe("Failed to read/create config.yml! Make sure it's up to date and/or readable+writable!", ex);
return;
}
}