mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Add /back returning-by-death
This commit is contained in:
1 parent
6cd2a23770
commit
8dff4a123a
6 files changed
+24
-11
No files matched your search
@@ -74,7 +74,7 @@ public class BukkitPlayer extends OnlineUser {
|
||||
@Override
|
||||
public CompletableFuture<Position> getPosition() {
|
||||
final Location location = getLocation();
|
||||
return BukkitHuskHomes.getInstance().getServer(this).thenApplyAsync(server -> new Position(
|
||||
return BukkitHuskHomes.getInstance().getServer(this).thenApply(server -> new Position(
|
||||
location.x, location.y, location.z, location.yaw, location.pitch, location.world, server));
|
||||
|
||||
}
|
||||
@@ -131,9 +131,9 @@ public class BukkitPlayer extends OnlineUser {
|
||||
PaperLib.teleportAsync(player, bukkitLocation.get(), PlayerTeleportEvent.TeleportCause.COMMAND)
|
||||
.thenAccept(result -> {
|
||||
if (result) {
|
||||
resultCompletableFuture.completeAsync(() -> TeleportResult.COMPLETED_LOCALLY);
|
||||
resultCompletableFuture.complete(TeleportResult.COMPLETED_LOCALLY);
|
||||
} else {
|
||||
resultCompletableFuture.completeAsync(() -> TeleportResult.FAILED_INVALID_WORLD);
|
||||
resultCompletableFuture.complete(TeleportResult.FAILED_INVALID_WORLD);
|
||||
}
|
||||
}));
|
||||
return resultCompletableFuture.join();
|
||||
|
||||
Reference in new issue
Block a user