mojira.dev
MC-81025

/playsound shows message even if sound doesn't exist

Hi,
This is a minor bug.
When typing /playsound mob.jellyfish.sting [other parameters], a sound that does not exist, it displays that it has played to the user.
No matter what is put in the second parameter, even if it does not exist, it shows that it is playing.
Perhaps have the client/ server communicate to check if the sound exists.

Comments 9

You can add sounds, with event, in resource packs, intended

I know. But even if a resource pack doesn't have THAT sound name, it will still say its being played. Just should have a message like "Song not found", makes debugging a lot easier.

yeah, but single player has server side as well, and servers cannot detect if anyone has that sound or not

Not really sure what you mean... The server would need to see if the client had that song available. There really needs to be more integration with sounds and the server, since the server knows nothing about what client sounds are active – terrible for projects like one I'm working on where I want to see if the users volume isn't 0%, stop a sound on the client, ability to offset /playsound, like /playsound <offset in milliseconds>.
This might not seem important, but its the start of client/ server integration which can lead to some awesome maps/ plugins.

The server would need to see if the client had that song available

the thing is, it can't, I doesn't know what resourcepacks you have on

also, the latter is a feature request, this is a bug tracker

What I said in my previous comment is a feature request, although my initial post about saying if it was played successfully is a bug. It might not be possible as of yet to determine if the sound was played, but its still a bug and something I hope gets addressed.
Thanks!

You cannot know on the server if they have the sound or not.

But java spits out a shiny warning about not being able to play a soundEvent
Can't the warning be handled if it is detected?

Servers have resource packs, and as you said even single-player is just a local server
on top of that, /playsound already has a list of what sounds are available for when you press tab. why can't you use that list if all else fails?

Both the warning and the tab complete list are client side. In theory the server could ask the client for a response packet to determine the command's success, but that is not a good idea

Toby Mellor

Erik Broes

Unconfirmed

Minecraft 1.8.7

Retrieved