mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-15 15:16:46 +01:00
Add completable future return to AsyncUtils
This commit is contained in:
parent
7d574317dc
commit
c57e35c58a
@ -7,8 +7,8 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public final class AsyncUtils {
|
||||
|
||||
public static void runAsync(@NotNull Runnable runnable) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
public static @NotNull CompletableFuture<Void> runAsync(@NotNull Runnable runnable) {
|
||||
return CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
runnable.run();
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user