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

"tag" entity selector does not support spaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 20w46a, 21w03a, 1.18.1, 1.20.6
    • None
    • Confirmed
    • Commands
    • Low
    • Platform

      For example, /execute if entity @e[tag="Test Tag"] returns an "expected end of options" error.

      This is inconsistent, as entities themselves can indeed support tags with spaces.

      How to reproduce

      1. /summon minecraft:creeper ~ ~ ~ {Tags:["hi there"]}
        
      2. Try the following
        /execute if entity @e[type=creeper,tag=hi there]
        /execute if entity @e[type=creeper,tag="hi there"]
        
        /tag @e[type=creeper] remove hi there
        /tag @e[type=creeper] remove "hi there"
        

        Note: The first /tag variant is even suggested by the command syntax help
        None of these commands is considered valid

            Unassigned Unassigned
            ShiningComet222 Hooda the Antagonist
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: