In Game Command API
For people who are not mod developers, Immersive Messages adds a few commands for sending messages.
/immersivemessages send
This function sends a basic, typewriter message with sound effects above the player's hotbar, with a duration and selector. It can send to multiple players at once.
mclang
/immersivemessages send @a 5 message/immersivemessages toast
This function is just like the one above, but will send a Toast preset. The main difference here is that the title must be in quotes.
mclang
/immersivemessages toast @a 5 "title" subtitle/immersivemessages popup
Similar to toast, but for popups.
mclang
/immersivemessages popup @a 5 "title" subtitle/immersivemessages sendcustom
This function is where you can send fully customized messages using NBT. For example:
mclang
/immersivemessages sendcustom @a {anchor:4, background:1, wrap:1, typewriter:1, align:0} 8 this is a test messageSupported Parameters
- String
color- takes hexadecimal color codebgColor- takes color codeborderTop- takes color codeborderBottom- takes color codefont- takes ResourceLocation, for example,immersivemessages:robotoanchor- takes TextAnchor, for example,CENTER_CENTERorBOTTOM_RIGHTalign- takes TextAnchor, see above
- Float
xysize
- Boolean (can be set to 1)
typewritersoundbolditalicwrapbackgroundrainbowshakewaveobfuscateslideupslidedownslideleftsliderightslideoutupslideoutdownslideoutleftslideoutright
