From 401a6d87803e6275a51e3d3274016ae9e3660620 Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 17 Dec 2020 13:05:35 +0200 Subject: [PATCH] Last thing for job migration --- src/main/java/com/gamingmesh/jobs/config/ConfigManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index 3c955dd6..979206de 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -71,6 +71,7 @@ public class ConfigManager { private final Set jobFiles = new HashSet<>(); public static final String exampleJobName = "_EXAMPLE"; + public static final String exampleJobInternalName = "exampleJob"; public ConfigManager() { this.jobFile = new File(Jobs.getFolder(), "jobConfig.yml"); @@ -704,7 +705,7 @@ public class ConfigManager { if (jobFiles.isEmpty()) { File[] files = jobsPathFolder.listFiles((dir, name) -> name.toLowerCase().endsWith(".yml") - && !name.toLowerCase().equalsIgnoreCase(exampleJobName)); + && !name.toLowerCase().equalsIgnoreCase(exampleJobName + ".yml")); if (files != null) { for (File file : files) { jobFiles.add(new YmlMaker(jobsPathFolder, file)); @@ -738,7 +739,7 @@ public class ConfigManager { for (String jobKey : jobsSection.getKeys(false)) { // Ignore example job - if (jobKey.equalsIgnoreCase(exampleJobName)) { + if (jobKey.equalsIgnoreCase(exampleJobInternalName)) { continue; }