Print name of busted server config files

This commit is contained in:
Shane Freeder 2021-01-05 11:21:03 +00:00
parent 2acbfb04e5
commit bc2999f578

View File

@ -621,10 +621,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - load config files
+ private static org.bukkit.configuration.file.YamlConfiguration loadConfigFile(File configFile) throws java.io.IOException, org.bukkit.configuration.InvalidConfigurationException {
+ private static org.bukkit.configuration.file.YamlConfiguration loadConfigFile(File configFile) throws Exception {
+ org.bukkit.configuration.file.YamlConfiguration config = new org.bukkit.configuration.file.YamlConfiguration();
+ if (configFile.exists()) {
+ config.load(configFile);
+ try {
+ config.load(configFile);
+ } catch (Exception ex) {
+ throw new Exception("Failed to load configuration file: " + configFile.getName(), ex);
+ }
+ }
+ return config;
+ }