mojira.dev
MC-56246

name= selector does not function with names containing symbols

When using a selector with name=, if there is a mob with a custom name or username with a space or symbol in it, the player/mob is not able to be found by the selector.

(Note on players with spaces in username - yes there are players with spaces in their names, it is possible - i.e. [space]Bob, or a space before the username)

Test:
1.Summon entity with CustomName with a space/symbol in it.

/summon Pig ~ ~ ~ {CustomName:Bob Bob,CustomNameVisible:1}
/summon Pig ~ ~ ~ {CustomName:/,CustomNameVisible:1}

2.Use a selector on entity.

/tp @e[name=Bob Bob] ~ ~5 ~
/tp @e[name=/] ~ ~5 ~

3.Errors:

First command: '@e[name=Bob' is not a valid number – Thinks it is a coordinate value
Second command: The entity UUID provided is in an invalid format

Linked issues

Comments 3

This is not a complete duplicate, this is for symbols as well.

I have a similar issue. In the screenshot, http://garethpw.net/dev/misc/2015-07-15_13.58.27.png, one can infer that the first command in chat succeeds, however the second does not since it produces the result visible in the "isK" scoreboard on the right of the screen.

onnowhere

(Unassigned)

Unconfirmed

Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b

Retrieved