Messages and Sounds¶
Quick Start: Spice it up with twists.
Message tags send text and sound tags play sounds, each to everyone, one player, or one role. The one-line forms live in the cheatsheet.
| Tag | Meaning |
|---|---|
<gmessage:text> |
Send text to every participant, empty (alias <gmsg>). |
<pmessage:player,text> |
Send text to one player (alias <pmsg>). |
<rmessage:role,text> |
Send text to one role, ALL sends to both (alias <rmsg>). |
<gsound:id,pitch,volume> |
Play a sound for every participant. |
<psound:player,id,pitch,volume> |
Play a sound for one player. |
<rsound:role,id,pitch,volume> |
Play a sound for one role (ALL plays for both). |
<lsound:[x,y,z,world],id,pitch,volume> paid |
Play a sound at a point for nearby players; a 6-element loc works too, angles ignored. |
<gmsg:[enabled,text]> (+ pmsg, rmsg) |
Sends only when the gate is true or 1. |
<gsound:[enabled,id,pitch,volume]> (+ psound, rsound) |
Plays only when the gate is true or 1. |
<lsound:loc,[enabled,id,pitch,volume]> paid |
Plays at the point only when the gate is true or 1. |
<actionbar.set:message,stay,fadeout> paid |
Show actionbar text for every participant, empty. |
<actionbar.clear> paid |
Clear the shared actionbar line, empty. |
<pactionbar.set:player,message,stay,fadeout> paid |
Show actionbar text for one player, empty. |
<pactionbar.clear:player> paid |
Clear one player's line, empty. |
<ractionbar.set:role,message,stay,fadeout> paid |
Show actionbar text for one role, empty. |
<ractionbar.clear:role> paid |
Clear one role's lines, empty. |
<gactionbar.set:message,stay,fadeout> paid |
Show actionbar text for every participant, empty. |
<gactionbar.clear> paid |
Clear every participant's line, empty. |
<random-sound:[lo,hi],[vol]> paid |
A random sound primitive [true, id, pitch, volume] from block, entity, and item sounds. |
<gerror:text> |
Error-colored text to every participant, empty (alias <gerrormessage>; [enabled,text] gate works too). |
<perror:player,text> |
Error-colored text to one player (alias <perrormessage>; player,[enabled,text] works too). |
<rerror:role,text> |
Error-colored text to one role (alias <rerrormessage>; role,[enabled,text] works too). |
Every message tag arrives in the running modifier's broadcast color:
no per-message color boilerplate needed. An explicit leading color in
the text still wins, and \<<modcolor>\> colors mid-message
segments (<modcolor> alone reads the plain #hex).
Message tags take literal preset text (MiniMessage), never
message keys from the lang files.
<lsound> plays at its point for nearby players (audible range follows the
volume), so a located effect like a thawing ice cage is heard where it happens;
an unknown world or unloaded chunk warns and plays nothing. Its array form puts
the point first: <lsound:[x,y,z,world],[enabled,id,pitch,volume]>, which pairs
directly with a SOUND setting.
<actionbar.set> shows its message on the shared actionbar line
for every online player: stay holds the text in full
(default 3 seconds) and fadeout covers the fade (default 0.5
seconds). Timings are seconds like <ptitle>, trailing args may
be omitted, and the text parses like message text (MiniMessage
plus legacy codes) in the running modifier's broadcast color.
Bad timing warns plus null with nothing sent, and single
windows cap at one hour. <actionbar.clear> drops the line at
once. One line is shared, so a newer show supersedes a pending
one, and compass holders in a live match keep seeing compass
text (it pushes every tick). <pactionbar.set> shows the same
timed line to one player, with <ractionbar.set> and
<gactionbar.set> fanning out per member; each player's line
supersedes independently, and clears are idempotent, so offline
players clear silently. Actionbar shows carry no engine
{prefix}, like titles.
<random-sound> draws its id from block, entity, and item sounds only
(no music or UI), and returns a gated primitive that drops straight
into any sound tag: <lsound:[<px>,<py>,<pz>,<pworld>],<random-sound>>.
Pitch draws from arg one ([0.8, 1.2] default, clamped to 0..2),
volume from arg two (1.0 default, bottomed at 0); both take
singles or [min, max] pairs, and malformed args warn and fall back
to defaults.
Every sound and message tag also takes an array form with an enabled
gate as the first element: <gsound:[enabled,id,pitch,volume]>,
<psound:player,[enabled,id,pitch,volume]>,
<rsound:role,[enabled,id,pitch,volume]>,
<lsound:[x,y,z,world],[enabled,id,pitch,volume]>, <gmsg:[enabled,text]>,
<pmsg:player,[enabled,text]>, <rmsg:role,[enabled,text]> (the
long gmessage, pmessage, rmessage names work too). The sound
plays or the text sends only when the gate is true or 1; any
other value skips silently with no warning, so scripts can gate on
flags (<gmsg:[<lflag:loud>,hello]>) without an <if>. Array pitch
and volume behave exactly like the individual form.
Error tags send like message tags but in the configured
error-color: {prefix} plus the color plus the text. The longer
<gerrormessage>, <perrormessage>, and <rerrormessage> names
are byte-identical aliases, and every form takes the same
[enabled,text] gate.
Sound ids are namespaced Minecraft keys (e.g.
block.note_block.pling); pick them with
JSoundExplorer.