API Reference
Chat
Global chat publish
POST
/api/plugin/chat Publish a global chat message
Broadcasts a chat line network-wide. The hub fans it back out to every connected server (including the sender) over the event stream.
Request body
application/json
{
"playerUuid": "string",
"playerName": "string",
"message": "string",
"serverId": "string",
"serverType": "string",
"rank": "string",
"rankColor": "string",
"rankBold": false,
"colorNameAlso": false
} Responses
-
204Accepted and fanned out. -
400Bad Request
Request
~
curl -X POST http://localhost:8090/api/plugin/chat \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerUuid":"string","playerName":"string","message":"string","serverId":"string","serverType":"string","rank":"string","rankColor":"string","rankBold":false,"colorNameAlso":false}'// Publish to network-wide chat; the hub fans it out over the event stream.
hive.chat().publish(playerUuid, playerName, message,
serverId, serverType, "VIP", "#55FF55", false /* rankBold */, false /* colorNameAlso */);