Skip to content

Commit e604c9f

Browse files
authored
Fix teleport-cooldown not applying to /tp <x> <y> <z> (#6568)
Self-teleport to coordinates called now() with cooldown disabled, so it ignored teleport-cooldown while every other self-teleport path enforces it. Enable the cooldown flag for this case. Fixes #6499
1 parent 49cc72c commit e604c9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Essentials/src/main/java/com/earth2me/essentials/commands

Essentials/src/main/java/com/earth2me/essentials/commands/Commandtp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void run(final Server server, final User user, final String commandLabel,
5656
throw new NotEnoughArgumentsException(user.playerTl("teleportInvalidLocation"));
5757
}
5858
final Location locpos = new Location(user.getWorld(), x2, y2, z2, user.getLocation().getYaw(), user.getLocation().getPitch());
59-
user.getAsyncTeleport().now(locpos, false, TeleportCause.COMMAND, future);
59+
user.getAsyncTeleport().now(locpos, true, TeleportCause.COMMAND, future);
6060
future.thenAccept(success -> {
6161
if (success) {
6262
user.sendTl("teleporting", locpos.getWorld().getName(), locpos.getBlockX(), locpos.getBlockY(), locpos.getBlockZ());

0 commit comments

Comments
 (0)