KOKOTO WebChat

KOKOTO WebChat 5.4.0 增加了可选的独立 Web 用户注册、可配置的用户名注册密码长度以及仅限 Web 的个人资料,支持 Minecraft UUID 身份配置、固定消息计数显示选项,并修正了群组邀请和已保存对话 PDF 的用户界面。这些变更是与上次发布的 5.3.3 版本进行比较的。配置模式:5.4.0;中继协议:2.2;计划支持的 JAR 目标数:48 个。
KOKOTO WebChat 是一款服务器端的 Minecraft Web 聊天工具,适用于 Bukkit/Paper/Spigot 1.18–26.3 (Java 17),Fabric 精确目标版本为 1.18.2–26.3,NeoForge 精确目标版本为 1.20.2–26.3,以及 Forge 精确目标版本为 1.18.2–26.3;加载器目标根据 Minecraft 版本选择 Java 17/21/25。它可以独立运行,也可以运行在受支持的地图前端中。
5.4.0 新功能(相较于 5.3.3)
- Web 注册(可选,默认关闭):采用 Java 版风格的 ID(3–16 位 ASCII 字母/数字/下划线),
web:<username> 登录方式(当无歧义时可通过 auth.web-login-without-prefix: true 选择省略前缀),可配置的注册密码长度(默认 12–128 位),独立的 Web 个人资料 UUID 和头像。现有的 Web ID 将在加载时自动回填。
- Minecraft 身份:在加入游戏时独立于浏览器认证注册 UUID 身份;在适当位置显示 Minecraft 玩家头颅。每五分钟维护周期检查一次外部权限变更,而非每次查看 Web 个人资料时都进行检查。
- 聊天 UI:紧凑的房间内本地群组邀请搜索;改进了归档查看器/PDF 渲染及模态框点击/触摸交互;可自定义固定消息数量。
- 事件文本:在游戏中显示配置好的带时区感知的自动结束时间。
- 身份说明:Web 名称和 Minecraft 名称可能相同,但账户并未关联,且在 5.4.0 版本中,它们的历史私聊/群组数据也不会合并。
亮点
- 多平台架构:共享行为位于
kwc-core 中;Bukkit、Fabric、NeoForge 和 Forge 提供特定加载器的服务端集成,同时复用相同的核心与前端/适配器
- 双向游戏 ↔ Web 聊天:支持链接 Minecraft 账户,并提供可选的访客聊天功能
- BlueMap 插件 + 独立页面:支持深色/浅色/高对比度 UI、画中画 (PIP)、可拖拽/调整大小的窗口、搜索、回复、置顶以及虚拟滚动
- 1:1 私聊:支持本地和跨服收件人,精确的服务器+UUID 路由,重试安全传输,未读/已读状态显示,以及共享的游戏/Web 线程
- 群组聊天室:支持公开/私有可见性、邀请、密码、保留期限限制、未读计数、发送重试保护以及成员管理
- 中继协议 2.2:用于多服务器社区,支持显式群组、互惠对等节点、独立的每节点发送/接收策略、基于 HKDF-SHA256/AES-256-GCM 的逐跳保护、经过身份验证的响应、防重放/环路防御、服务器徽章以及来源过滤器
- DiscordSRV 集成:加上 Discord 媒体缓存以及可选的 Emoji 链接增强功能
- 上传与丰富预览:支持图片、视频、音频、YouTube/Shorts,并可选嵌入 TikTok 和 X/Twitter
- 确定性长历史虚拟滚动:跨越图片、GIF、视频、音频、YouTube/iframes 和链接预览,并在媒体尺寸稳定后修正滚动锚点
- Unicode 感知内容过滤:用于公共/群组聊天及可选的私聊,支持屏蔽/掩码/替换、批量词表、自定义规则、反规避匹配以及 Web 管理员测试
- 自定义 Emoji 管理:支持多文件管理员上传,并可选通过相同的
plugins/KOKOTO-WebChat/emojis 目录结构集成 ImageEmojis-Bero Bukkit/Paper 插件;其资源包 HTTP 端口仍作为单独的服务端面向客户端服务
- SimpleNicks-Bero 昵称集成:在 Bukkit/Paper 系列服务器上通过
player-display.mode: "display-name" 实现,同时 KWC 保留真实的链接账户身份
- 可配置的消息令牌:如
:enter: / :newline: / :tab:,支持管理员本地化别名和可打印的自定义替换
- Web 推送 / 关键词通知以及管理员更新通知
- 按账户的视觉 UI 配置文件,以及针对已登录用户的账户同步关键词/通知偏好设置;设备本地的窗口状态和推送端点保持本地存储
- 管理员 Discord 关键词警报,具备 KWC 拥有的匹配/去重功能以及 DiscordSRV 逻辑频道选择
- 管理与 Moderation 工具:包括消息删除、置顶、访客/IP 禁言、会话撤销、用户限制、自定义 Emoji 管理以及私聊元数据
- 可选的只读私聊和群组聊天正文审计:仅供明确列入白名单的最高管理员使用;两者默认均处于禁用状态,且每次审计页面读取都会被记录
- 内置 UI 语言:English, Korean, Japanese, Simplified Chinese
私聊与传输可靠性
跨服私聊目标由服务器 ID + 玩家 UUID 标识,因此本地玩家不会与同名但在其他服务器上的玩家混淆。远程消息将保持待定状态,直到目标确认存储。失败或不确定的发送可以使用持久的中继/客户端消息 ID 进行重试,而不会重复发送者或接收者记录。
私聊和群组聊天消息的状态会紧凑地显示在时间戳旁边。正常的成功传输是静默的;仅在需要时才显示待定或失败的传输状态。私聊消息在未读时会显示简短的未读标签,被收件人阅读后则显示 ✓。群组消息会显示尚未阅读该消息的收件人数量,当所有人都已阅读时变为 ✓。
多服务器中继
Relay Protocol 2.2 在显式信任组内承载公共聊天和跨服务器私聊(DM)的发送/读取/删除流程,并通过能力门控公开反应/打字、聊天事件路由以及远程公共资料查询,同时保持 Protocol major 2 作为 wire-compatibility(底层兼容性)边界。每个群组拥有一个共享密钥;对等节点没有独立密钥,且必须在同一群组中相互配置。每条消息请求均独立进行身份验证和加密。/relay/v2/handshake 是一个无状态的诊断性身份/健康探测接口,不参与路由控制。消息使用方向性的 HKDF-SHA256 密钥和 AES-256-GCM 逐跳认证加密;响应经过 HMAC 认证,并借助时间戳/随机数/中继 ID/跳数防御机制来拒绝重放攻击或循环。
每个对等节点将 enabled 作为总开关,并可针对 public-chat、event、dm 和 profile 独立配置 send 和 receive。缺失的配置项默认为启用状态以保持兼容性。KWC Chat Events 使用独立的 event 源而非普通的 system,因此可以拒绝远程事件公告而不抑制无关的系统通知。公共反应/打字遵循 public-chat 设置;私聊的反应/打字/读取/删除遵循 dm 设置。
由于中继载荷仍保持加密和认证状态,可以直接使用单跳 HTTP,但需附带明确警告。转发过滤是按对等节点进行的:HTTP 对等节点仅在该转发跳中被排除,而同一群组中的其他 HTTPS 对等节点仍然可用。Relay Protocol 2.2 并非端到端加密:转发服务器作为受信任参与者会解密并重新加密。旧的 Relay v1 端点返回 HTTP 426。
从 5.0.0 首次升级时,旧的扁平化中继设置不会转换为猜测生成的群组。中继将被重置为禁用状态,以便操作员在重新启用之前明确定义 v2 信任组。
管理员私聊审计
普通管理员无法自动查看私人消息正文。可选的审计访问需要在 private-chat-super-admins 中指定精确的 Minecraft 用户名/UUID 以及对应的功能开关:
direct-message:
admin-audit:
enabled: false
group-chat:
admin-audit:
enabled: false
审计视图为只读。群组审计不会加入房间,也不影响已读/未读状态。每次审计页面阅读都会记录操作者及分页元数据,但不会将消息正文复制到审计日志中。
部署
全新配置默认禁用插件主开关,以便操作员在启用前审查存储、身份验证、上传、保留策略和 Web 暴露情况。在迁移期间,捆绑的 config.yml 是唯一的模板:KWC 会创建一个新的当前默认配置,并叠加现有的操作员值,因此旧注释和布局会被当前捆绑的注释和布局替换。在重建之前,固定旧版本的配置会被备份。<version>_auto_migration 会在启动/重载时重复此重建过程;精确的 <version> 会锁定当前版本配置,防止同版本重写。config-reference-<version>.yml 是一份可供管理员阅读的精确默认副本,而非迁移源,过期的生成参考文件/迁移文件会自动清理。/kchat reload 会在停止实时服务之前验证编辑后的 YAML;无效的 YAML 将被拒绝,从而确保之前的运行配置、UI 语言和服務保持活跃。捆绑的 UTF-8 初始过滤器词表(涵盖韩语、英语、日语和简体中文)仅在缺少 starter-list 标记时初始化一次;现有或禁用的文件会被保留,且初始化后由管理员执行的删除操作不可逆。
对于公开部署,建议使用 Caddy 或 Nginx 将 BlueMap 和 KOKOTO WebChat 置于 HTTPS 之后。
可选集成
- BlueMap(Bukkit 版以及 Fabric/NeoForge 26.1.2/26.2/26.3 和 Forge 26.1.2/26.2/26.3 上的 BlueMapAPI)
- squaremap 和 Dynmap 文件系统 Web 适配器
- Pl3xMap(适用于 Bukkit/Paper 家族和 Fabric)
- LiveAtlas、uNmINeD 和 Minecraft Overviewer 静态 Web 适配器
- DiscordSRV(适用于 Bukkit)
- ImageEmojis-Bero(适用于 Bukkit/Paper 家族服务器(共享 KWC 表情路径 + 运行时字形解析);通用 ImageEmojis 操作遵循上游插件文档)
- SimpleNicks-Bero(通过 Bukkit 显示名称适用于 Bukkit/Paper 家族服务器;通用 SimpleNicks 操作遵循上游插件文档)
- Web Push 通知
请参阅捆绑的 README 和 docs/ 目录以获取完整的配置、反向代理、中继、安全、迁移和故障排除指南。
AI 辅助披露
生成式 AI 被用作开发助手,参与代码审查、实现与修补、文档起草和多语言翻译。项目需求、架构/设计决策、集成、测试、兼容性验证、发布验证和最终验收均由人类主导和审查。AI 辅助输出在纳入之前会经过审查和验证。
KOKOTO WebChat

KOKOTO WebChat 5.4.0 adds opt-in independent Web user registration, configurable signup password lengths and Web-only profiles, Minecraft UUID identity provisioning, pinned-count display choices and corrected group-invite and saved-conversation PDF UI. Changes are compared with the last published 5.3.3 release. Configuration schema: 5.4.0; Relay Protocol: 2.2; 48 planned JAR targets.
KOKOTO WebChat is a server-side Minecraft web chat for Bukkit/Paper/Spigot 1.18–26.3 (Java 17), Fabric exact targets 1.18.2–26.3, NeoForge exact targets 1.20.2–26.3, and Forge exact targets 1.18.2–26.3; mod-loader targets select Java 17/21/25 by Minecraft version. It can run standalone or within supported map frontends.
What's new in 5.4.0 (from 5.3.3)
- Web signup (opt-in, default OFF): Java Edition-style IDs (3–16 ASCII letters/digits/underscores),
web:<username> login (optional prefix omission with auth.web-login-without-prefix: true when unambiguous), configurable registration password length (default 12–128), distinct Web profile UUID and avatars. Existing web IDs are backfilled on load.
- Minecraft identity: register UUID identities on join independently of browser authentication; show Minecraft head where appropriate. Check external permission changes on a five-minute maintenance cycle, not every web profile view.
- Chat UI: compact room-local group invitation search; improved archive viewer/PDF rendering and modal click/touch interaction; customizable pinned-message counts.
- Event text: show configured time-zone-aware automatic end times in game.
- Identity note: Web and Minecraft names may coincide, but accounts are not linked, nor are their historical DM/group data merged in 5.4.0.
Highlights
- Multi-platform architecture: shared behavior lives in
kwc-core; Bukkit, Fabric, NeoForge, and Forge provide loader-specific server integration while reusing the same core and frontend/adapters
- Two-way game ↔ web chat with linked Minecraft accounts and optional guest chat
- BlueMap addon + standalone page with dark/light/high-contrast UI, PIP, draggable/resizable windows, search, replies, pins, and virtual scrolling
- 1:1 direct messages with local and cross-server recipients, exact server+UUID routing, retry-safe delivery, unread/read state, and shared game/web threads
- Group chat rooms with public/private visibility, invitations, passwords, retention limits, unread counts, delivery retry protection, and member management
- Relay Protocol 2.2 for multi-server communities with explicit groups, reciprocal peers, independent per-peer send/receive policy, HKDF-SHA256/AES-256-GCM hop-by-hop protection, authenticated responses, replay/loop defenses, server badges and source filters
- DiscordSRV integration plus Discord media caching and optional emoji-link augmentation
- Uploads and rich previews for images, video, audio, YouTube/Shorts, with optional TikTok and X/Twitter embeds
- Deterministic long-history virtual scrolling across images, GIFs, video, audio, YouTube/iframes and link previews, with scroll-anchor correction as media sizes settle
- Unicode-aware content filtering for public/group chat and optional DM with Block/Mask/Replace, bulk word lists, custom rules, anti-evasion matching and Web Admin testing
- Custom emoji management with multi-file administrator upload, plus optional ImageEmojis-Bero Bukkit/Paper integration using the same
plugins/KOKOTO-WebChat/emojis tree; its resource-pack HTTP port remains a separate client-facing service
- SimpleNicks-Bero nickname integration on Bukkit/Paper-family servers through
player-display.mode: "display-name", while KWC retains the real linked account identity
- Configurable message tokens such as
:enter: / :newline: / :tab: with administrator-localizable aliases and printable custom substitutions
- Web Push / keyword notifications and administrator update notifications
- Per-account visual UI profiles plus account-synced keyword/notification preferences for signed-in users; device-local window state and Push endpoints stay local
- Administrator Discord keyword alerts with KWC-owned matching/deduplication and DiscordSRV logical-channel selection
- Administration and moderation tools for message deletion, pins, guest/IP mutes, session revocation, user restrictions, custom emoji management, and private-chat metadata
- Optional read-only DM and group-chat body audit for explicitly allowlisted super administrators; both are disabled by default and every audit page read is logged
- Built-in UI languages: English, Korean, Japanese, Simplified Chinese
Private messaging and delivery reliability
Cross-server DM targets are identified by server ID + player UUID, so a local player cannot be confused with a same-name player on another server. Remote messages stay pending until the destination confirms storage. Failed or uncertain sends can be retried with persistent relay/client message IDs without duplicating sender or receiver records.
DM and group-chat message state is shown compactly beside the timestamp. Normal successful delivery is silent; pending or failed delivery is shown only when needed. DM messages use a short unread label until the recipient reads them, then show ✓. Group messages show the number of recipients who have not read the message and change to ✓ when everyone has read it.
Multi-server relay
Relay Protocol 2.2 carries public chat and cross-server DM/read/delete flows inside explicit trust groups and capability-gates public reactions/typing, chat-event routing, and remote public-profile lookup while keeping Protocol major 2 as the wire-compatibility boundary. Each group has one shared secret; peers have no individual secret and must be configured reciprocally in the same group. Every message request authenticates/encrypts itself independently. /relay/v2/handshake is a stateless diagnostic identity/health probe and does not control routing. Messages use directional HKDF-SHA256 keys and AES-256-GCM hop-by-hop authenticated encryption; responses are HMAC-authenticated and timestamp/nonce/relay-ID/hop defenses reject replay or loops.
Each peer keeps enabled as a master switch and may independently configure send and receive for public-chat, event, dm, and profile. Missing entries default to enabled for compatibility. KWC Chat Events use the distinct event source rather than ordinary system, so remote event announcements can be rejected without suppressing unrelated system notices. Public reaction/typing follow public-chat; DM reaction/typing/read/delete follow dm.
Direct one-hop HTTP can be used with an explicit warning because relay payloads remain encrypted/authenticated. Forwarding filtering is per peer: an HTTP peer is excluded only as that forwarding hop, while other HTTPS peers in the same group remain eligible. Relay Protocol 2.2 is not end-to-end encryption: forwarding servers decrypt and re-encrypt as trusted participants. Legacy Relay v1 endpoints return HTTP 426.
On the first upgrade from 5.0.0, old flat relay settings are not converted into guessed groups. Relay is reset disabled so the operator can explicitly define the v2 trust groups before re-enabling it.
Administrator private-chat audit
Private message bodies are not automatically exposed to normal administrators. Optional audit access requires an exact Minecraft name/UUID in private-chat-super-admins and the corresponding feature switch:
direct-message:
admin-audit:
enabled: false
group-chat:
admin-audit:
enabled: false
Audit views are read-only. Group audit does not join the room or affect read/unread state. Every audit page read records the actor and pagination metadata without copying message bodies into the audit log.
Deployment
Fresh configurations start with the plugin master switch disabled so operators can review storage, authentication, uploads, retention, and web exposure before enabling it. During migration, the bundled config.yml is the only template: KWC creates a fresh current default and overlays existing operator values, so old comments/layout are replaced by the current bundled comments/layout. A fixed older-version config is backed up before reconstruction. <version>_auto_migration repeats this rebuild on startup/reload; exact <version> fixes the current-version config and prevents same-version rewriting. config-reference-<version>.yml is an administrator-readable exact default copy, not the migration source, and obsolete generated reference/migration files are cleaned up automatically. /kchat reload validates edited YAML before stopping live services; invalid YAML is rejected so the previous running configuration, UI language, and services remain active. Bundled UTF-8 starter filter-word lists for Korean, English, Japanese, and Simplified Chinese are initialized once when the starter-list marker is absent; existing or disabled files are preserved, and administrator deletions after initialization are not reversed.
For public deployments, placing BlueMap and KOKOTO WebChat behind HTTPS with Caddy or Nginx is recommended.
Optional integrations
- BlueMap (Bukkit plus BlueMapAPI on Fabric/NeoForge 26.1.2/26.2/26.3 and Forge 26.1.2/26.2/26.3)
- squaremap and Dynmap filesystem web adapters
- Pl3xMap on Bukkit/Paper-family and Fabric
- LiveAtlas, uNmINeD, and Minecraft Overviewer static-web adapters
- DiscordSRV on Bukkit
- ImageEmojis-Bero on Bukkit/Paper-family servers (shared KWC emoji path + runtime glyph resolution); general ImageEmojis operation follows the upstream plugin documentation
- SimpleNicks-Bero on Bukkit/Paper-family servers through Bukkit display names; general SimpleNicks operation follows the upstream plugin documentation
- Web Push notifications
See the bundled README and docs/ directory for full configuration, reverse-proxy, relay, security, migration, and troubleshooting guides.
AI assistance disclosure
Generative AI was used as a development assistant for code review, implementation and patching, documentation drafting, and multilingual translation. Project requirements, architecture/design decisions, integration, testing, compatibility verification, release validation, and final acceptance are human-directed and reviewed. AI-assisted output is reviewed and validated before inclusion.
评论 0
登录后参与评分
还没有评论,来抢沙发吧