mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Use completedFuture instead
This commit is contained in:
parent
3ba29f1147
commit
31deef2a62
@ -372,7 +372,7 @@ public final class LocalExpansionManager implements Listener {
|
|||||||
public CompletableFuture<@NotNull List<@Nullable Class<? extends PlaceholderExpansion>>> findExpansionsOnDisk() {
|
public CompletableFuture<@NotNull List<@Nullable Class<? extends PlaceholderExpansion>>> findExpansionsOnDisk() {
|
||||||
File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar"));
|
File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar"));
|
||||||
if(files == null){
|
if(files == null){
|
||||||
return CompletableFuture.supplyAsync(Collections::emptyList);
|
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
return Arrays.stream(files)
|
return Arrays.stream(files)
|
||||||
|
Loading…
Reference in New Issue
Block a user