mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
Load chunks via PaperLib asynchronously
This commit is contained in:
1 parent
a73296969d
commit
d1c1efe753
1 file changed
+1
-1
@@ -421,7 +421,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find a safe position and return
|
// Find a safe position and return
|
||||||
PaperLib.getChunkAtAsync(bukkitLocation).thenAccept(chunk ->
|
PaperLib.getChunkAtAsync(bukkitLocation).thenAcceptAsync(chunk ->
|
||||||
future.complete(BukkitSafetyUtil.findSafeLocation(location.world, bukkitLocation,
|
future.complete(BukkitSafetyUtil.findSafeLocation(location.world, bukkitLocation,
|
||||||
chunk.getChunkSnapshot()))).exceptionally(throwable -> {
|
chunk.getChunkSnapshot()))).exceptionally(throwable -> {
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
|
|||||||
Reference in new issue
Block a user