Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-10-03 08:21:06 +02:00
Fix NPE if config was null in BungeeCord module
Dieser Commit ist enthalten in:
Ursprung
3e7e34dfb9
Commit
5552f34871
@ -57,13 +57,13 @@ public class GeyserBungeePlugin extends Plugin implements IGeyserBootstrap {
|
|||||||
Files.copy(in, file.toPath());
|
Files.copy(in, file.toPath());
|
||||||
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
|
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
|
||||||
} catch (IOException ex) {
|
} 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configuration == null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ public class GeyserBungeePlugin extends Plugin implements IGeyserBootstrap {
|
|||||||
try {
|
try {
|
||||||
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
|
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(getDataFolder(), "config.yml"));
|
||||||
} catch (IOException ex) {
|
} 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren