TextComponent - Send (Effect) — SkBee
Addon: SkBee · Category: Effect · Since: 1.5.0
Syntax
send [(text|action[[ ]bar])] component[s] %objects% [to %audiences%]Description
Send text components to audiences. You can also broadcast components as well. As of 1.16.0 you can also send action bar components to players and you can also send normal strings. `to %audiences%` = An audience is anything that can receieve a component (players, entities, console, worlds, server, etc).
The optional sender (supported in Minecraft 1.16.4+) allows you to send components from a specific player. This is useful to make sure players can block messages using MC 1.16.4's new player chat ignore system.
Examples
set {_comp::1} to text component of "hi player "
set {_comp::2} to text component of "hover over me for a special message!"
set hover event of {_comp::2} to hover event showing "OoO look ma I'm hovering!"
send component {_comp::*} to player
send components {_comp::*} and " ooo pretty!" to player
send actionbar component {_comp::1} to player
# Send a message to your fellow teammates
command /teambroadcast <msg:string>:
trigger:
set {_team} to team of player
set {_mini} to mini message from "[TeamMessage from %player%] %{_msg}%"
send component {_mini} to {_team}