mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
Don't use timed teleport for console commands
This commit is contained in:
1 parent
66e9eaf2b2
commit
606fbb6caa
2 files changed
+3
-3
No files matched your search
@@ -113,12 +113,12 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
|
|||||||
plugin.getTeleportManager().teleport(foundUser.get(), position.get())
|
plugin.getTeleportManager().teleport(foundUser.get(), position.get())
|
||||||
.thenAccept(result -> {
|
.thenAccept(result -> {
|
||||||
if (result.successful) {
|
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 {
|
} else {
|
||||||
plugin.getLoggingAdapter().log(Level.WARNING, "Failed to teleport" + foundUser.get().username + " to a random position.");
|
plugin.getLoggingAdapter().log(Level.WARNING, "Failed to teleport" + foundUser.get().username + " to a random position.");
|
||||||
}
|
}
|
||||||
plugin.getTeleportManager().finishTeleport(foundUser.get(), result);
|
plugin.getTeleportManager().finishTeleport(foundUser.get(), result);
|
||||||
}).join();
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe
|
|||||||
plugin.getTeleportManager().teleportToPlayerByName(playerToTeleport, teleportCommandTarget.targetPlayer);
|
plugin.getTeleportManager().teleportToPlayerByName(playerToTeleport, teleportCommandTarget.targetPlayer);
|
||||||
} else {
|
} else {
|
||||||
assert teleportCommandTarget.targetPosition != null;
|
assert teleportCommandTarget.targetPosition != null;
|
||||||
plugin.getTeleportManager().timedTeleport(playerToTeleport, teleportCommandTarget.targetPosition)
|
plugin.getTeleportManager().teleport(playerToTeleport, teleportCommandTarget.targetPosition)
|
||||||
.thenAccept(teleportResult -> {
|
.thenAccept(teleportResult -> {
|
||||||
if (teleportResult.successful) {
|
if (teleportResult.successful) {
|
||||||
plugin.getLoggingAdapter().log(Level.INFO, "Successfully teleported " + playerToTeleport.username);
|
plugin.getLoggingAdapter().log(Level.INFO, "Successfully teleported " + playerToTeleport.username);
|
||||||
|
|||||||
Reference in new issue
Block a user