> For the complete documentation index, see [llms.txt](https://wiki.auraplugins.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.auraplugins.eu/guides/worldguard-music.md).

# Zone Music & WorldGuard

Music sounds turn areas of your world into *places* — a town with its theme, a dungeon with its dread, a boss arena with its drums. This guide covers how zone music behaves and how to set it up.

## The rules of music

1. A `music` sound is bound to a **zone**: a WorldGuard region, or a built-in `area` if you don't use WorldGuard.
2. **Each player hears at most one music at a time.**
3. If several musics apply at once (overlapping regions), the highest `priority` wins.
4. Leaving the zone stops the music (with fade / transition); entering starts it.

## Quick creation

With the region `dungeon_1` already defined in WorldGuard:

```
/aurasounds create dungeon_theme music mypack:dungeon_theme dungeon_1
```

## Full example

```yaml
type: music
enabled: true
priority: 10               # highest priority wins when zones overlap

playback:
  sound: 'mypack:dungeon_theme'
  category: MUSIC
  volume: 0.8
  loop:
    enabled: true
    duration: '2m30s'
    interval: '5s'
  transition:
    outro-sound: 'mypack:dungeon_theme_outro'
    overlap: '1s'

source:
  region: 'dungeon_1'      # WorldGuard region name…

conditions:                # optional, all conditions work here too
  time: ['night']
```

## Without WorldGuard: built-in areas

No WorldGuard? Define the zone as a box between two corners, directly in the sound file:

```yaml
source:
  area:
    world: world
    from: {x: 100, y: 0, z: 200}
    to: {x: 180, y: 128, z: 260}
```

A music requires exactly one of `source.region` or `source.area`.

## Layered zones with priorities

The classic town-inside-a-kingdom setup:

* `kingdom` region → `kingdom_theme`, priority **1**
* `town` region (inside the kingdom) → `town_theme`, priority **5**
* `arena` region (inside the town) → `battle_theme`, priority **10**

Players hear the most specific music wherever they are, and it switches automatically as they cross boundaries.

## Real transitions

The vanilla protocol cannot crossfade. AuraSounds' answer is the `transition` block: when a music must stop, its `outro-sound` (a short tail — a final chord, a fading drone) plays and **overlaps** the next music's beginning for `overlap` time. Done well, it sounds like a deliberate transition rather than a cut.

{% hint style="info" %}
WorldGuard is only required for `source.region` and the `region` condition — built-in areas work everywhere.
{% endhint %}

## Performance note

Region lookups are **cached per player and per block**: while a player stays on the same block, WorldGuard is asked exactly once, no matter how many musics and `region` conditions you define. You can be generous with zone music without worrying about the tick budget.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.auraplugins.eu/guides/worldguard-music.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
