Fix addon loading issue

This commit is contained in:
Lukas Rieger (Blue) 2024-05-28 21:56:53 +02:00
parent 0cc0247930
commit 7afcbeefd7
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
2 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ public static void tryLoadAddons(Path root) {
}
public static void tryLoadAddons(Path root, boolean expectOnlyAddons) {
if (!Files.exists(root)) return;
try (Stream<Path> files = Files.list(root)) {
files
.filter(Files::isRegularFile)

View File

@ -126,7 +126,7 @@ private void load(@Nullable ResourcePack preloadedResourcePack) throws IOExcepti
Path addonsFolder = serverInterface.getConfigFolder().resolve("addons");
Files.createDirectories(addonsFolder);
Addons.tryLoadAddons(addonsFolder, true);
serverInterface.getModsFolder().ifPresent(Addons::tryLoadAddons);
//serverInterface.getModsFolder().ifPresent(Addons::tryLoadAddons);
//load configs
BlueMapConfigManager configManager = BlueMapConfigManager.builder()