Name | PlaySound |
Syntax | playsound (<location>|...) (<player>|...) [sound:<name>] (volume:<#.#>) (pitch:<#.#>) (custom) (sound_category:<category_name>) |
Short Description | Plays a sound at the location or to a list of players. |
Full Description | Plays a sound to a player or nearby players at a location.
The sound is played through the player's client just like any other sounds in Minecraft. For a list of all sounds, check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html Sounds are by default played under their normal sound type (eg zombie sounds are under the type Mobs/Animals). You can optionally instead specify an alternate sound category to use. For a list of all valid sound categories, check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/SoundCategory.html Specifying a player or list of players will only play the sound for each player, from their own location (but will not follow them if they move). If a location is specified, it will play the sound for any players that are near the location specified. If both players and locations are specified, will play the sound for only those players at those locations. Optionally, specify 'custom' to play a custom sound added by a resource pack, changing the sound name to something like 'random.click' Optionally specify a pitch value (defaults to 1.0). A pitch from 0.0 to 1.0 will be deeper (sounds like a demon), and above 1.0 will be higher pitched (sounds like a fairy). Optionally specify a volume value (defaults to 1.0). A volume from 0.0 to 1.0 will be quieter than normal. A volume above 1.0 however will not be louder - instead it will be audible from farther (approximately 1 extra chunk of distance per value, eg 2.0 is 2 more chunks, 5.0 is 5 more chunks, etc.). |
Related Tags | <server.sound_types> Deprecated in favor of server.sound_keys on MC 1.21+.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | noise |
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlaySoundCommand.java#L32 |