mojira.dev
MC-198135

"tag" entity selector does not support spaces

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

Linked issues

Comments 6

This is a duplicate of the linked report, not a relates to, note "However, neither the tag argument selector nor the /tag command support them." from that report

Reproduction steps added from MC-135740.

I can confirm for 20w46a.

Can confirm in 21w03a.

Can confirm in 1.18.1.

Still a problem in 2024. 1.20.6 Not sure why this is NOT getting fixed

Hooda the Antagonist

(Unassigned)

Confirmed

Platform

Low

Commands

1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 20w46a, 21w03a, 1.18.1, 1.20.6

Retrieved