mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Various fixes for /tp
This commit is contained in:
1 parent
cf6d9a6079
commit
9332371c71
3 files changed
+35
-8
No files matched your search
@@ -156,14 +156,14 @@ public class TeleportManager {
|
||||
if (currentlyOnWarmup.contains(onlineUser.uuid)) {
|
||||
return CompletableFuture.supplyAsync(() -> TeleportResult.FAILED_ALREADY_TELEPORTING);
|
||||
}
|
||||
return processTeleportWarmup(new TimedTeleport(onlineUser, position, teleportWarmupTime))
|
||||
return CompletableFuture.supplyAsync(() -> processTeleportWarmup(new TimedTeleport(onlineUser, position, teleportWarmupTime))
|
||||
.thenApply(teleport -> {
|
||||
if (!teleport.cancelled) {
|
||||
return teleportNow(onlineUser, position);
|
||||
return teleportNow(onlineUser, position).join();
|
||||
} else {
|
||||
return CompletableFuture.supplyAsync(() -> TeleportResult.CANCELLED);
|
||||
return TeleportResult.CANCELLED;
|
||||
}
|
||||
}).join();
|
||||
}).join());
|
||||
} else {
|
||||
return teleportNow(onlineUser, position);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user