Fix update folder logging error when no folder exists (#8891)

This commit is contained in:
Jake Potrebic 2023-02-22 12:17:58 -08:00
parent 75e61d5bf2
commit eb56bf3058

View file

@ -489,9 +489,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ final Path resolvedUpdateDirectory = pluginDirectory.resolve(updateDirectoryName);
+ if (!Files.isDirectory(resolvedUpdateDirectory)) {
+ if (Files.exists(resolvedUpdateDirectory)) {
+ LOGGER.error("Misconfigured update directory!");
+ LOGGER.error(("Your configured update directory (%s) in bukkit.yml is pointing to a non-directory path. " +
+ "Disabling auto updating functionality.").formatted(resolvedUpdateDirectory));
+ LOGGER.error("Your configured update directory ({}) in bukkit.yml is pointing to a non-directory path. " +
+ "Auto updating functionality will not work.", resolvedUpdateDirectory);
+ }
+ return new PluginInitializerManager(pluginDirectory, null);
+ }
+