Better Commands
Better Commands
  • Home
  • Commands
    • /ability
    • /bc
    • /clear
    • /clearspawnpoint
    • /damage
    • /enchant
    • /execute
    • /forceenchant
    • /gamemode
    • /gamerule
    • /give
    • /kill
    • /me
    • /msg
    • /old
    • /playsound
    • /remove
    • /say
    • /scoreboard
    • /setblock
    • /spawnpoint
    • /summon
    • /team
    • /teammsg
    • /teleport
    • /time
    • /trigger
  • Target Selectors
  • Data types
  • Entity Aliases
  • Scoreboard
Powered by GitBook
On this page
  • Syntax
  • Arguments
  • Examples
  • History
Edit on GitHub
  1. Commands

/playsound

Plays a specified sound to a player or in a location, and at a specific volume and pitch.

Syntax

playsound <sound> (<targets>|<pos>) [<volume>] [<pitch>] [<maxDistance>]

Arguments

<sound> String

Specifies the sound to play. Should be the filename of a sound (minus the extension), basically the same thing used for minetest.sound_play

<targets> Selector

Specifies the entities at whose position the sound will play.

<pos> Position

Specifies the position to play the sounds from.

<volume> Number

Specifies the value by which the volume will be multiplied. 1 is normal, 0.5 is half, 2 is double.

<pitch> Number

Specifies the value by which the pitch will be multiplied. 1 is normal, 0.5 is an octave down, 2 is an octave up.

<maxDistance> Number

The maximum distance from <pos> or <targets> at which the sound can still be heard.

Examples

To play the sound of TNT igniting 3 nodes behind the nearest player:

/execute as @p at @s run playsound tnt_ignite ^ ^ ^-3

History

Version
Action

v1.0

Added /playsound

Previous/oldNext/remove

Last updated 1 year ago