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

# Messaging & UI

> Chat, action bars, titles, toasts, boss bars, sounds and commands.

Everything a player reads or hears. These mechanics only reach **player** targets; other entities in the target list are skipped.

```yaml theme={null}
- narrate "&7Sir Toast greets you, <target.name>!" +onInteract @trigger
- title{title=&4Phase Two;subtitle=&7It's angry now;stay=2s} @playersInRadius{r=30}
- sound{s=entity.wither.spawn;volume=2} +onSpawn @playersInRadius{r=30}
- command "give <target.name> diamond 1" +onDeath @trigger
```

Text takes `&` colour codes and [placeholders](https://entities.lodemc.net/placeholders.md).

| Mechanic | Usage | What it does |
| :- | :- | :- |
| `actionbar` <sub>also sendactionmessage, actionmessage, am</sub> | `actionbar "<text>"` | Shows text above a player's hotbar. |
| `barcreate` <sub>also baradd, createbar</sub> | `barCreate{name=infobar;display=<text>;value=1;color=RED;style=SOLID}` | Shows a boss bar to player targets. |
| `barremove` | `barRemove{name=infobar}` | Removes a boss bar. |
| `barset` | `barSet{name=infobar;display=<text>;value=1}` | Updates a boss bar's text or value. |
| `command` <sub>also cmd</sub> | `command "<console command>"   (asCaster/asTarget/asOp/requireTarget)` | Runs a command for each target, as console by default. `asCaster`, `asTarget` and `asOp` change who runs it. |
| `messagejson` <sub>also jsonmessage, jmsg, jm</sub> | `messageJSON{message=<json>}` | Sends a JSON text component to player targets. |
| `narrate` <sub>also message, msg, m</sub> | `narrate "<text>"` | Sends a chat message to player targets. `narrate "text"` is the short form of `narrate{message=text}`. |
| `randommessage` <sub>also randommsg, rmsg, rm</sub> | `randommessage{messages=<first>\|<second>}` | Sends one message picked at random from a `\|`-separated list. |
| `sendresourcepack` <sub>also resourcepack</sub> | `sendResourcePack{url=<url>;hash=<sha1>}` | Sends a resource pack to a player. |
| `sendtoast` <sub>also advancementmessage, advmessage, toastmessage, toastmsg</sub> | `sendToast{message=<text>;icon=diamond_sword;frame=challenge}` | Shows an advancement-style toast to a player. |
| `sound` <sub>also s, playsound, effect:sound, e:s</sub> | `sound{s=<sound key>;volume=1;pitch=1;category=master;radius=16}` | Plays a sound at the target. |
| `stopsound` <sub>also effect:stopsound, e:ss, ss</sub> | `stopSound{sound=<key>}` | Stops a sound playing for a player. |
| `title` <sub>also sendtitle</sub> | `title{title=<text>;subtitle=<text>;fadein=10;stay=3s;fadeout=10}` | Shows a title and subtitle to player targets. MythicMobs' `fi`, `d` and `fo` work for the timings. |

Speech bubbles over the mob are the `speak` aura; see [Auras](https://entities.lodemc.net/mechanics-auras.md). Holograms are under [World & Blocks](https://entities.lodemc.net/mechanics-world.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.