Use completedFuture instead

This commit is contained in:
Andre601 2021-12-01 21:30:41 +01:00
parent 3ba29f1147
commit 31deef2a62

View File

@ -372,7 +372,7 @@ public final class LocalExpansionManager implements Listener {
public CompletableFuture<@NotNull List<@Nullable Class<? extends PlaceholderExpansion>>> findExpansionsOnDisk() {
File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar"));
if(files == null){
return CompletableFuture.supplyAsync(Collections::emptyList);
return CompletableFuture.completedFuture(Collections.emptyList());
}
return Arrays.stream(files)