> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmentities.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Messaging & UI

> Chat messages, action bars, titles, sounds and console commands.

Mechanics that talk to players: chat, action bars, titles, sounds and console commands. All of them skip non-player targets silently, except `sound` and `command` which work on any target.

## message

Sends a chat message to player targets.

**Aliases:** `narrate`, `msg`, `m`

| Attribute | Alias | Description                                                          |
| --------- | ----- | -------------------------------------------------------------------- |
| `message` | `m`   | The text to send. Supports `&` colors and [placeholders](variables). |

```yaml theme={null}
- message{m=&7Sir Toast greets you!} #onInteract @target
- narrate "&aHello there!"           #onSpawn @playersRadius[20]
```

## actionbar

Shows a message in the action bar (above the hotbar).

**Aliases:** `sendactionmessage`, `am`

| Attribute | Alias | Description       |
| --------- | ----- | ----------------- |
| `message` | `m`   | The text to show. |

```yaml theme={null}
- actionbar{message=&eHits: <var.hits>} #onHurt @target
```

## title

Shows a title and optional subtitle in the middle of the screen.

**Alias:** `sendtitle`

| Attribute  | Description                |
| ---------- | -------------------------- |
| `title`    | The big text.              |
| `subtitle` | The smaller text below it. |
| `fadein`   | Fade-in time.              |
| `stay`     | How long it stays.         |
| `fadeout`  | Fade-out time.             |

```yaml theme={null}
- title{title=&4The Toast King;subtitle=&7has awakened;fadein=10;stay=60;fadeout=10} #onSpawn @world
```

## sound

Plays a sound at each target's position. Works on any target, not just players.

**Aliases:** `s`, `playsound`

| Attribute | Alias | Description                               |
| --------- | ----- | ----------------------------------------- |
| `sound`   | `s`   | The sound id, e.g. `entity.zombie.death`. |
| `volume`  | `v`   | Volume. `1` is normal.                    |
| `pitch`   | `p`   | Pitch. `1` is normal, lower is deeper.    |

```yaml theme={null}
- sound{sound=entity.wither.spawn;volume=2;pitch=0.8} #onSpawn @playersRadius[30]
```

## command

Runs a console command once per target. [Placeholders](variables) let you insert the target into the command.

**Alias:** `cmd`

| Attribute | Alias | Description                                  |
| --------- | ----- | -------------------------------------------- |
| `command` | `c`   | The command to run, without the leading `/`. |

```yaml theme={null}
- command{c=give <target.name> diamond 1} #onDeath @target
```

Useful placeholders here: `<caster.name>`, `<target.name>`, `<target.uuid>`.
