diff --git a/src/main/java/me/clip/placeholderapi/expansion/manager/LocalExpansionManager.java b/src/main/java/me/clip/placeholderapi/expansion/manager/LocalExpansionManager.java index 5ba2821..29db58b 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/manager/LocalExpansionManager.java +++ b/src/main/java/me/clip/placeholderapi/expansion/manager/LocalExpansionManager.java @@ -370,7 +370,12 @@ public final class LocalExpansionManager implements Listener { @NotNull public CompletableFuture<@NotNull List<@Nullable Class>> findExpansionsOnDisk() { - return Arrays.stream(folder.listFiles((dir, name) -> name.endsWith(".jar"))) + File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar")); + if(files == null){ + return CompletableFuture.supplyAsync(Collections::emptyList); + } + + return Arrays.stream(files) .map(this::findExpansionInFile) .collect(Futures.collector()); }