Compatibility
Minecraft: Java Edition
1.21.1
Platforms
Supported environments
Client and server
Links
Creators
Details
UniChat Adapter for Minecraft
Your livestream chat, inside Minecraft.
Connect your minecraft to UniChat and let then interact with the world.

Workers
Events can also run server commands. The rules live in <world_folder>/serverconfig/unichat_adapter-workers.jsonc.
A worker has four parts:
name- Worker display name;onEvent- Worker listening event;conditions- Conditions from event that triggers this worker;action.execCommands- A list of commands that server will execute;
// Runs server commands when a UniChat event matches every condition.
//[
// {
// "name": "Spawn creeper on donate over 100 dollars",
// "onEvent": "unichat:donate",
// "conditions": [
// { "property": "platform", "operator": "EQUALS", "value": "youtube" },
// { "property": "value", "operator": "GREATER_THAN_OR_EQUAL", "value": 100 }
// ],
// "actions": {
// "execCommands": [
// "/execute as @a at @s run summon minecraft:creeper ~ ~ ~"
// ]
// }
// },
// {
// "name": "Shoutout raid",
// "onEvent": "unichat:raid",
// "conditions": [],
// "actions": {
// "execCommands": [
// "/title @a title [{\"text\":\"${authorDisplayName}\",\"color\":\"${authorDisplayColor}\"}]",
// "/title @a subtitle [{\"text\":\"Acabou de chegar com seus espectadores\"}]",
// "/execute as @a at @s run playsound ui.toast.challenge_complete master @s ~ ~ ~ 1 1"
// ]
// }
// },
// {
// "name": "Shoutout donation",
// "onEvent": "unichat:donate",
// "conditions": [
// { "property": "platform", "operator": "NOT_EQUALS", "value": "twitch" }
// ],
// "actions": {
// "execCommands": [
// "/title @a actionbar [{\"text\":\"${authorDisplayName}\",\"color\":\"${authorDisplayColor}\"}, {\"text\":\" acabou de doar\", \"color\":\"white\"}, {\"text\":\" ${currency} ${value}\", \"color\":\"yellow\"}, {\"text\":\"!\", \"color\":\"white\"}]",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 0.8",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1.2",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1.4"
// ]
// }
// },
// {
// "name": "Shoutout twitch donation",
// "onEvent": "unichat:donate",
// "conditions": [
// { "property": "platform", "operator": "EQUALS", "value": "twitch" }
// ],
// "actions": {
// "execCommands": [
// "/title @a actionbar [{\"text\":\"${authorDisplayName}\",\"color\":\"${authorDisplayColor}\"}, {\"text\":\" acabou de doar\", \"color\":\"white\"}, {\"text\":\" ${round(value)} bits\", \"color\":\"yellow\"}, {\"text\":\"!\", \"color\":\"white\"}]",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 0.8",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1.2",
// "/execute as @a at @s run playsound entity.player.levelup master @s ~ ~ ~ 1 1.4"
// ]
// }
// }
//]
Available condition operators are:
EQUALS: Available fornumeric,stringandbooleanproperties;NOT_EQUALS: Available fornumeric,stringandbooleanproperties;GREATER_THAN: Available fornumericpropertiesGREATER_THAN_OR_EQUAL: Available fornumericproperties;LESS_THAN: Available fornumericproperties;LESS_THAN_OR_EQUAL: Available fornumericproperties;CONTAINS: Available forstringproperties;STARTS_WITH: Available forstringproperties;ENDS_WITH: Available forstringproperties;
A complete list of UniChat Events can be founded here.
Commands can read the same fields with ${fieldName}, for example /say ${authorDisplayName} said it.
Run /unichat reload to apply changes without restarting.
License
This mod is licensed under the Eclipse Public License 2.0.


