Protocol V2
首页
相关项目
  • nonebot-adapter-minecraft
  • nonebot-plugin-mcqq
  • mc-plugin
  • koishi-plugin-minecraft-sync-msg
  • zerobot-plugin-mcqq
  • astrbot_plugin_mcqq
  • queqiao_mcdr
  • koishi-plugin-minecraft-adapter
GitHub
首页
相关项目
  • nonebot-adapter-minecraft
  • nonebot-plugin-mcqq
  • mc-plugin
  • koishi-plugin-minecraft-sync-msg
  • zerobot-plugin-mcqq
  • astrbot_plugin_mcqq
  • queqiao_mcdr
  • koishi-plugin-minecraft-adapter
GitHub
  1. API
  • 首页
  • 部署
  • 配置文件
  • 命令
  • 开发 & 构建
  • API
    • Broadcast
    • Title & SubTitle
    • Action Bar
    • Private Message
    • Rcon
  • Event
    • Player
    • PlayerChatEvent
    • PlayerCommandEvent
    • PlayerJoinEvent
    • PlayerQuitEvent
    • PlayerDeathEvent
    • PlayerAchievementEvent
  • 数据模型
    • API
      • Response
    • EventModel
      • Base
        • BaseEvent
        • BaseMessageEvent
        • BaseNoticeEvent
        • BasePlayerMessageEvent
        • BasePlayerNoticeEvent
      • Achievement
        • Display
        • Achievement
      • Death
        • Death
    • Event
      • Player
        • Player
        • PlayerChatEvent
        • PlayerCommandEvent
        • PlayerJoinEvent
        • PlayerQuitEvent
        • PlayerAchievementEvent
        • PlayerDeathEvent
  1. API

Private Message

ws://127.0.0.1:8080
PrivateMessage
最后修改时间:2025-11-15 11:48:55

🛰️ WebSocket 接口文档#

📡 接口名称#

私聊消息接口(send_private_msg)

🧭 字段描述#

字段路径类型默认值说明
uuidstring-接收者 UUID(优先使用),可选,如果为空则使用 nickname。
nicknamestring-接收者昵称,当 uuid 为空时使用。
messagejson-私聊消息内容。参考 Minecraft 文本组件。
发送的聊天消息会在前方添加前缀,默认为:[鹊桥]
uuid 与 nickname 至少传递一个
若都传递,则优先使用 uuid

🧱 数据结构#

🔹 消息格式#

{
    "api": "send_private_msg",
    "data": {
        "uuid": null,
        "nickname": "17TheWord",
        "message": [
            {
                "text": "[私聊消息]",
                "color": "aqua"
            },
            {
                "text": "说:",
                "color": "white"
            },
            {
                "text": "聊天内容",
                "color": "white"
            }
        ]
    },
    "echo": "1"
}

🔹 返回信息#

{
    "code": 200,
    "post_type": "response",
    "status": "SUCCESS",
    "message": "success",
    "data": {
        "target_player": {
            "nickname": "string",
            "uuid": "string",
            "is_op": true,
            "address": "string",
            "health": 0,
            "max_health": 0,
            "experience_level": 0,
            "experience_progress": 0,
            "total_experience": 0,
            "walk_speed": 0,
            "x": 0,
            "y": 0,
            "z": 0
        },
        "message": "Send private message success."
    },
    "echo": "1"
}

请求参数

Header 参数

修改于 2025-11-15 11:48:55
上一页
Action Bar
下一页
Rcon
Built with