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

Commands that don't need a target don't work in execute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.10.2, Minecraft 16w42a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed

      Description

      Commands like:
      /execute @p ~ ~ ~ tp ~ ~1 ~
      don't work correctly (teleporting the nearest player one block up), but instead give out two error messages:
      Player 'commands.generic.player.unspecified' cannot be found
      and
      `Failed to execute 'tp ~ ~1 ~' as <Player name>
      where <Player name> is the @p player.
      There are three bugs here, but if one gets fixed, the others become irrelevant:

      • The command doesn't work like it would if it got executed from the player (which execute should simulate).
      • The player name doesn't get put into the first error message. If the target selection for example meets an item, it gets displayed the same way as in the /kill feedback, but not for the player.
      • There are two error messages for one error.

      If the first one gets fixed, the other two get irrelevant.
      Other examples are:

      • /execute @p ~ ~ ~ scoreboard teams join test
      • /execute @p ~ ~ ~ achievement give achievement.openInventory
      • /execute @p ~ ~ ~ clear
      • /execute @p ~ ~ ~ gamemode 1
      • /execute @p ~ ~ ~ kill
      • /execute @p ~ ~ ~ setworldspawn
      • /execute @p ~ ~ ~ spawnpoint
      • /execute @p ~ ~ ~ xp 1

      Special cases:

      • /execute @e ~ ~ ~ help shows the help to the player who executed the /execute command once per entity, not to the selected entity itself.
      • /execute @e ~ ~ ~ seed shows the seed to the player who executed the /execute command once per entity, not the one selected entity itself.
      • /execute @p ~ ~ ~ msg @p test shows <Player name> whispers to you: test and You whisper to <Player name>: test.
        /msg @p test shows the error message Player 'commands.message.sameTarget' cannot be found. The same error message appears for every other entity with its UUID as player description.
      • execute @p ~ ~ ~ publish works correctly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                FaRo1 Fabian Röling
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: