Fix not being able to remove minions that are there by default

This commit is contained in:
TomTom 2024-08-01 11:28:10 +02:00
parent 2c0629b5ed
commit 77443db3ad

View File

@ -38,7 +38,9 @@ public final class Minions {
}
this.failedToLoad.clear();
com.artillexstudios.axminions.utils.FileUtils.copyFromResource("minions");
if (this.minionsDirectory.mkdir()) {
com.artillexstudios.axminions.utils.FileUtils.copyFromResource("minions");
}
Collection<File> files = FileUtils.listFiles(this.minionsDirectory, new String[]{"yaml", "yml"}, true);
LogUtils.debug("Parsing minion configs {}", String.join(", ", files.stream().map(File::getName).toList()));