Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-277417

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Future Update
    • 1.21.2 Pre-Release 1
    • Confirmed
    • Commands
    • Very Important
    • Platform

      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.

            gegy1000 [Mojang] Gegy
            TheWorfer27 TheWorfer27
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: