From 5552f34871905abc02d801d992c2e29326e7cedf Mon Sep 17 00:00:00 2001 From: Redned Date: Mon, 2 Dec 2019 08:27:45 -0600 Subject: [PATCH] Fix NPE if config was null in BungeeCord module --- .../geysermc/platform/bungeecord/GeyserBungeePlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeePlugin.java b/bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeePlugin.java index 0a97230d..5542ed8e 100644 --- a/bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeePlugin.java +++ b/bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeePlugin.java @@ -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; } }