mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
Fix timedTeleport to run asynchronously using thenApplyAsync
This commit is contained in:
1 parent
973ae90905
commit
53b16ed75f
1 file changed
+1
-1
@@ -388,7 +388,7 @@ public class TeleportManager {
|
|||||||
*/
|
*/
|
||||||
private CompletableFuture<TimedTeleport> processTeleportWarmup(@NotNull final TimedTeleport teleport) {
|
private CompletableFuture<TimedTeleport> processTeleportWarmup(@NotNull final TimedTeleport teleport) {
|
||||||
// Execute the warmup start event
|
// Execute the warmup start event
|
||||||
return plugin.getEventDispatcher().dispatchTeleportWarmupEvent(teleport, teleport.timeLeft).thenApply(event -> {
|
return plugin.getEventDispatcher().dispatchTeleportWarmupEvent(teleport, teleport.timeLeft).thenApplyAsync(event -> {
|
||||||
// Handle event cancellation
|
// Handle event cancellation
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
teleport.cancelled = true;
|
teleport.cancelled = true;
|
||||||
|
|||||||
Reference in new issue
Block a user