Skip to content

Messages and Sounds

For: advanced users narrating their mods.

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).
<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.
<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> stays for coloring mid-message segments. Message tags take literal preset text (MiniMessage), never messages.yml keys.

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]>, <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.

Next Steps