in a command block or similar where: @a is to execute on all players at thier coords the playsound command with entity.spider.death being the sound you want and @p to target the nearest player (again said player).
It's more about where the sound gets generated (emitted from) and who can hear it (the players).
You can't REALLY play a server-wide sound as you probbably think, like a magic sound that everyone gets to hear wherever they are, believe me, i tried, at best you can play a sound with a very lalrge volume radius, which basically ddictate the reange the sound will be heard from.
But to resume, you can only "summon" a sound emitter at certain coordinates or entities, only then to make said sound hearable to the nearest player to said sound source, that's what both the @a and @p in my command does. I may have the syntax a bit wrong since i typed that from memory but the main idea is there. You could just hop on your server and test it if it does what you want it to do.
would /execute the command: playsound entity.spider.death @a from the nearest player. So all can hear it on the server? So in the effect, is hat no difference to this command:
hi, i am using spigot. How can i play a global sound on the server.
a)default-minecraft
b)from a resourcepack
in the 1.12.json(java Minecraft) is f.e. a:
minecraft/sounds/mob/spider/death.ogg
How can i play the deth.ogg global on the server?
thank you!
IIRC you could do something like
in a command block or similar where: @a is to execute on all players at thier coords the playsound command with entity.spider.death being the sound you want and @p to target the nearest player (again said player).
thank you. So:
/execute @a ~ ~ ~ playsound entity.spider.death @a
would play the sound to all players
And:
/execute @p ~ ~ ~ playsound entity.spider.death @a
???
It's more about where the sound gets generated (emitted from) and who can hear it (the players).
You can't REALLY play a server-wide sound as you probbably think, like a magic sound that everyone gets to hear wherever they are, believe me, i tried, at best you can play a sound with a very lalrge volume radius, which basically ddictate the reange the sound will be heard from.
But to resume, you can only "summon" a sound emitter at certain coordinates or entities, only then to make said sound hearable to the nearest player to said sound source, that's what both the @a and @p in my command does. I may have the syntax a bit wrong since i typed that from memory but the main idea is there. You could just hop on your server and test it if it does what you want it to do.
o.k., @a @p. But what ist @p @a good for?
I explained this in my first comment, to recap:
@a is to target all players and
@p is to target the nearest player.
/execute @p ~ ~ ~ playsound entity.spider.death @a
would /execute the command: playsound entity.spider.death @a from the nearest player. So all can hear it on the server? So in the effect, is hat no difference to this command:
/execute @a ~ ~ ~ playsound entity.spider.death @a
this thread is kinda old but i still want to show you the command i found:
say you want to play a wither sound everywhere
/playsound entity.wither.spawn master @a ~ ~ ~ 1.0 1.0 1.0
this is the command i used in 1.15. there is no fade if you get away or stuff like that, it plays everywhere no matter how you try to stop it.
Edit: My bad, some sounds like the thundercrash have a wide travel radius of up to 160000 blocks
*Ominous horn blares*