mojira.dev
MC-95538

/playsound command doesn't work with selectors not resolving to exactly one entity

When executing the command "/playsound minecraft:entity.player.burp player @a", I get the response "This player cannot be found"
The command works fine with @p or if you use a real players name, but just not with @a

The same thing happens both when the command is executed by a player or is executed by a command block.
And it happens with every <source>, not just "player".

Linked issues

Attachments

Comments 17

the command sintax changed
/playsound <sound> <source> <player> [volume] [pitch] [minimum volume]
source is one of the following and effects the slider in the music/sounds menu:

voice, music, hostile, record, weather, neutral, block, ambient, master, player

Edit: didn't see you used correct syntacs, @a is indeed broken

Confirmed for selectors resolving to !=1 player.

i added some screenshots, maybe they can be usefull

For me, I get the error message: "An unknown error occurred while attempting to perform this command" if I just type in

/playsound minecraft:entity.shulker.ambient @a

And it doesn't matter what target selector I use, or if I use a player name.

However, if I type this in, adding coordinates, volume and pitch (which are all not required to be typed in in order to do this command):

/playsound minecraft:entity.shulker.ambient @a ~ ~ ~ 1 1

I get the error message "That player cannot be found." Again it doesn't matter if I use @a or @p or a player name.

@unknown the sintax changed, you require to specify a source between the sound and the player, use

/playsound minecraft:entity.shulker.ambient hostile @a ~ ~ ~ 1 1

The command will not work if the selector resolves to more than 1 player

7 more comments

Still in 1.9-pre1

Please note its not @a. The same issue happens with @p[c=2]. Wich selects the two nearest players
And it doesnt happen with @a[c=1]

It happens when more players are targeted

@unknown added a comment - 13/Jan/16 8:43 PM

Confirmed for selectors resolving to !=1 player.

already noted, could the title/description be updated to something like /playsound command doesn't work with @a (selectors resolving to more then one 1 player) please?

confirmed fixed for -pre2

jpdude98

michael

Confirmed

Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 1.9 Pre-Release 1

Minecraft 1.9 Pre-Release 2

Retrieved