Saltar al contenido principal

Ambient Sound Zone

Play ambient sound in a region

An ambient sound zone plays a sound when a player enters a protection region or WorldGuard region, and stops it when the player leaves. The sound is played once: it is not repeated while the player stays in the zone, and there is no fade. Minecraft cannot change the volume of a sound that is already playing, so fadeIn and fadeOut are kept but unused. If multiple zones overlap, the one with the highest priority takes precedence.

Campos

CampoTipoPredeterminadoDescripción
protectionRegionIdString—The protection region ID where the ambient sound plays (primary). Use the ID of a region_definition entry.
worldGuardRegionIdString—WorldGuard region name (optional fallback, read only when protectionRegionId is empty). Needs the WorldGuard plugin.
soundVar<Sound>EMPTYThe sound to play in this zone
layerAudioLayerAMBIENTThe audio layer to useValores:MASTERMUSICAMBIENTSFXVOICE
zoneVolumeVar<Float>1.0Volume multiplier for this zone (0.0 to 1.0), applied on top of the player's layer volume
fadeInDurationofSeconds(2)Minecraft cannot change the volume of a sound that is already playing, so this field does not produce a progressive fade; the sound starts at its full volume.
fadeOutDurationofSeconds(2)Minecraft cannot change the volume of a sound that is already playing, so this field does not produce a progressive fade; the sound is stopped at once when the player leaves.
loopingBooleantrueNot implemented yet: the sound is played once and is not repeated, whatever this value is
priorityInt0Priority when multiple zones overlap (higher wins)

How to use it​

Set protectionRegionId to the entry ID of a region created with the Protection extension. The zone starts when the player moves into the region and stops when they leave it. If several zones match, the one with the highest priority wins. worldGuardRegionId is used when protectionRegionId is empty and needs the WorldGuard plugin; zoneVolume multiplies the volume on top of the player's layer volume.

fadeIn and fadeOut have no effect: Minecraft cannot change the volume of a sound that is already playing, so the sound starts at its full volume and stops at once when the player leaves. looping is not implemented either: the sound is played once and is not repeated, so choose a sound long enough for the zone.