From 77443db3ad87b44941d9fa247c5f29e4e4ced16a Mon Sep 17 00:00:00 2001 From: TomTom <93038247+AverageGithub@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:28:10 +0200 Subject: [PATCH] Fix not being able to remove minions that are there by default --- .../java/com/artillexstudios/axminions/config/Minions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/artillexstudios/axminions/config/Minions.java b/src/main/java/com/artillexstudios/axminions/config/Minions.java index 5f180f8..61fc861 100644 --- a/src/main/java/com/artillexstudios/axminions/config/Minions.java +++ b/src/main/java/com/artillexstudios/axminions/config/Minions.java @@ -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 files = FileUtils.listFiles(this.minionsDirectory, new String[]{"yaml", "yml"}, true); LogUtils.debug("Parsing minion configs {}", String.join(", ", files.stream().map(File::getName).toList()));