Mojira Archive
MC-277417

/tp no longer works when run from a command block without context from "execute as"

The /teleport command no longer works without execute as context. Here are some examples of commands that do and do not work when run through command blocks:

The following example commands do not work:

/tp @a 1 2 3
/tp @p ~ ~5 ~
/teleport @n[type=armor_stand] 1 2 3
/execute run tp @a ~ ~5 ~

The following example command does work:

/execute as @a run tp @s ~ ~5 ~

All commands that do not work give the following output: 

An unexpected error occurred trying to execute that command

 

All teleport commands in chat inherently work because they execute as the player typing them.

Fixed

TheWorfer27

[Mojang] Gegy

2024-10-08, 06:15 PM

2024-10-09, 01:57 PM

2024-10-09, 01:37 PM

6

3

Confirmed

Very Important

Platform

Commands

command

1.21.2 Pre-Release 1

1.21.2 Pre-Release 2