mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Sync get future
This commit is contained in:
parent
b2630cfb49
commit
126481833b
@ -208,6 +208,15 @@ public class J {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, r);
|
||||
}
|
||||
|
||||
public static CompletableFuture sfut(Runnable r) {
|
||||
CompletableFuture f = new CompletableFuture();
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Iris.instance, () -> {
|
||||
r.run();
|
||||
f.complete(null);
|
||||
});
|
||||
return f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue a sync task
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user