MineChat Server
MineChat 允许玩家在不通过 Minecraft 客户端加入服务器的情况下,在 Minecraft 服务器上聊天。
该插件提供了 MineChat 平台的服务器端组件,将游戏内聊天与外部 MineChat 客户端连接起来。
注意:本项目目前正在更新以遵循官方的 MineChat 协议规范,这将提高安全性和便利性。
当前版本仍可与旧版客户端配合使用,但未来可能会收到破坏性更改。
功能
- 客户端认证:MineChat 客户端使用临时链接代码进行一次认证。
- 聊天桥接:在游戏聊天中发送的消息会广播到已连接的 MineChat 客户端,反之亦然。
- 持久存储:链接代码和客户端信息保存在磁盘上,跨服务器重启持续存在。
- 自动清理:过期的链接代码每分钟自动移除一次。
使用方法
链接你的账号
-
在游戏中生成链接代码:
/link
你将收到一个有效期为 5 分钟的临时代码。
-
从 CLI 客户端 进行认证(图形界面客户端正在开发中):
minechat-client --server <host:port> --link <code>
这将把您的 MineChat 客户端链接到您的 Minecraft 账号,而无需使用 Minecraft 凭据。
高级:工作原理
- 服务器套接字:默认监听端口
25575 上的来自 MineChat 客户端的连接。
- 认证:使用链接代码或存储的 UUID 验证客户端,并广播加入/离开消息。
- 消息广播:将游戏内聊天发送给已连接的客户端,并将客户端消息中继到 Minecraft 聊天。
- 持久存储:将客户端数据存储在
plugins/MineChat/ 下的 JSON 文件中(link_codes.json 和 clients.json)。
贡献
欢迎贡献!请提交 问题 或拉取请求。
MineChat Server
MineChat lets players chat on a Minecraft server without needing to join the server from Minecraft.
This plugin provides the server-side component of the MineChat platform, connecting in-game chat with external MineChat clients.
Note: This project is currently being updated to follow the official MineChat protocol specification, which improves safety and convenience.
The current version still works with older clients but will receive breaking changes in the future.
Features
- Client authentication: MineChat clients authenticate once using a temporary link code.
- Chat bridging: Messages sent in Minecraft chat are broadcast to connected MineChat clients and vice versa.
- Persistent storage: Link codes and client information are saved on disk, persisting across server restarts.
- Automatic cleanup: Expired link codes are removed automatically every minute.
How to Use
Linking your account
-
Generate a link code in-game:
/link
You will receive a temporary code valid for 5 minutes.
-
Authenticate from the CLI client (a GUI client is in the works):
minechat-client --server <host:port> --link <code>
This links your MineChat client to your Minecraft account without using Minecraft credentials.
Advanced: How it Works
- Server socket: Listens for connections from MineChat clients on port
25575 by default.
- Authentication: Validates clients using link codes or stored UUIDs and broadcasts join/leave messages.
- Message broadcasting: Sends in-game chat to connected clients and relays client messages to Minecraft chat.
- Persistent storage: Stores client data in JSON files under
plugins/MineChat/ (link_codes.json and clients.json).
Contributing
Contributions are welcome! Please submit issues or pull requests.
评论 0
登录后参与评分
还没有评论,来抢沙发吧