Play Sound (Effect) — Skript
Addon: Skript · Category: Effect · Since: 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter)
Syntax
play sound[s] %strings% [[with] seed %-number%] [(in|from) %-soundcategory%] [(at|with) volume %-number%] [(and|at|with) pitch %-number%] (at|on|from) %locations/entities% [(to|for) %-players%]Description
Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and <a href="https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html">Spigot sound names</a> are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.
When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving. If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume are reflected based on the entity, and Minecraft may not use the values from this syntax.
Minecraft sometimes has a set of sounds under one sound ID that will randomly play. To counter this, you can directly state which seed to use.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Examples
play sound "block.note_block.pling"
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}
play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the player