From 606fbb6caae76308b5c43c2a45d3d7f0b2e2df90 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 24 Aug 2022 23:49:06 +0100 Subject: [PATCH] Don't use timed teleport for console commands --- .../java/net/william278/huskhomes/command/RtpCommand.java | 4 ++-- .../main/java/net/william278/huskhomes/command/TpCommand.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java b/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java index 3279e13c..a211f1bd 100644 --- a/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/RtpCommand.java @@ -113,12 +113,12 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable { plugin.getTeleportManager().teleport(foundUser.get(), position.get()) .thenAccept(result -> { if (result.successful) { - plugin.getLoggingAdapter().log(Level.INFO, "Teleported" + foundUser.get().username + " to a random position."); + plugin.getLoggingAdapter().log(Level.INFO, "Teleported " + foundUser.get().username + " to a random position."); } else { plugin.getLoggingAdapter().log(Level.WARNING, "Failed to teleport" + foundUser.get().username + " to a random position."); } plugin.getTeleportManager().finishTeleport(foundUser.get(), result); - }).join(); + }); }); } diff --git a/common/src/main/java/net/william278/huskhomes/command/TpCommand.java b/common/src/main/java/net/william278/huskhomes/command/TpCommand.java index 167ea9cf..4b51d9de 100644 --- a/common/src/main/java/net/william278/huskhomes/command/TpCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/TpCommand.java @@ -163,7 +163,7 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe plugin.getTeleportManager().teleportToPlayerByName(playerToTeleport, teleportCommandTarget.targetPlayer); } else { assert teleportCommandTarget.targetPosition != null; - plugin.getTeleportManager().timedTeleport(playerToTeleport, teleportCommandTarget.targetPosition) + plugin.getTeleportManager().teleport(playerToTeleport, teleportCommandTarget.targetPosition) .thenAccept(teleportResult -> { if (teleportResult.successful) { plugin.getLoggingAdapter().log(Level.INFO, "Successfully teleported " + playerToTeleport.username);