Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 77c27cf

Browse files
committed
[IMPORTANT] Change script extension to .dsc
also adds extension warnings
1 parent 762c995 commit 77c27cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/com/denizenscript/denizen2core/Denizen2Core.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,14 @@ private static void load() {
312312
Iterator<Path> pathi = paths.iterator();
313313
while (pathi.hasNext()) {
314314
Path p = pathi.next();
315-
if (!CoreUtilities.toLowerCase(p.toString()).endsWith(".yml")) {
315+
if (Files.isDirectory(p)) {
316+
continue;
317+
}
318+
if (!CoreUtilities.toLowerCase(p.toString()).endsWith(".dsc")) {
319+
if (!CoreUtilities.toLowerCase(p.toString()).endsWith(".disable")) {
320+
Debug.error("File with path in scripts folder '" + p.toString() + "' is invalid. "
321+
+ "Script files must end in .dsc, ignored files must end in .disable");
322+
}
316323
continue;
317324
}
318325
File f = p.toFile();

0 commit comments

Comments
 (0)