Tries to load the Main Configuration File. @throws IOException if there was a problem loading the Configuration.
()
| 299 | * @throws IOException if there was a problem loading the Configuration. |
| 300 | */ |
| 301 | private static void loadConfig() throws IOException { |
| 302 | File configFile = new File(modDirectory, "config.json"); |
| 303 | if (!configFile.exists() && !configFile.createNewFile()) { |
| 304 | throw new IOException("Could not create Configuration!"); |
| 305 | } |
| 306 | |
| 307 | config = new ConfigNew(configFile); |
| 308 | IntItem version = config.get("version", IntItem.class); |
| 309 | if (!version.isDefault()) { |
| 310 | config.reset(); |
| 311 | } |
| 312 | The5zigMod.logger.info("Loaded Configurations!"); |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Configures the main logger. |