邻近聊天气泡
适用于 Folia 和(可能)Paper 服务器的邻近文本聊天插件。
聊天消息以悬浮对话气泡的形式出现在玩家头顶上方,仅附近的玩家可读。

描述
当插件处于 开启 状态时,常规聊天不再显示在服务器聊天栏中。相反,每条消息都会变成挂载在发言者上方的文本气泡,任何在可配置半径内的人都可以看到(默认 24 格,仅限同一世界)。
功能
- 真正的邻近效果 —— 权限由服务器端权威控制:超出半径的客户端永远不会接收到气泡实体,因此修改过的客户端也无法读取远处的聊天内容。客户端视距仅是在此保证之上的渲染裁剪。
- 设计上的匿名性 —— 任何表面上都不会出现发送者名称,且消息内容永远不会被记录或写入磁盘。气泡是非持久化的显示实体。
- 故障安全(Fail-closed) —— 所有失败路径最终都表现为“无气泡”,绝不会导致文本泄露、冻结或截断。
- 三种模式 ——
ON(气泡替代聊天)、OFF(插件闲置,原版聊天不受影响)、SUPPRESSED(聊天被吞没,所有气泡清除)。可以在游戏中、控制台或通过其他插件经由 API 实时切换。
- 原生支持 Folia —— 完全区域线程安全并声明为
folia-supported;基于 Folia 调度器 API 构建,Paper 也提供该 API。(最初是为 Folia 事件构建的,因此甚至未测试过与 Paper 的兼容性)
- 强化的输入处理 —— Unicode NFC 规范化;剥离控制字符、不可见字符和双向字符;折叠空白字符;设置代码点长度上限,拒绝过长消息而非截断它们。气泡文本作为字面组件渲染,从不解析为标记语言。
- 速率限制 —— 每个已接受消息的玩家最小间隔时间限制了实体生成和数据包扇出的规模。
- 实时配置 ——
/proxchat reload 立即应用所有值。超出范围的值会被钳制并附带控制台警告;配置文件中的拼写错误绝不会阻止启用。
安装
- 将 jar 文件放入服务器的
plugins/ 文件夹中。
- 重启服务器。插件首次启动时为 关闭 状态——使用
/proxchat on 启用它。
模式会在重启后保持。
需要 Folia 或 Paper 26.1.2 或更高版本(Java 25 运行时)。
命令
/proxchat <status|on|off|suppress|clear|reload> — 权限 proxchat.admin
(默认:op)。
| 子命令 |
效果 |
status |
当前模式、实时气泡计数和配置摘要 |
on / off / suppress |
切换模式(离开 ON 会清除所有实时气泡) |
clear |
移除所有实时气泡而不更改模式 |
reload |
原地重新读取 config.yml;列出任何被钳制的值 |
配置
半径、气泡寿命、堆叠深度、高度、潜行隐藏、最大消息长度、
速率限制间隔等——每个键都在生成的 config.yml 中有文档说明,
通过 /proxchat reload 实时生效,且缺失的键会回退到默认值,因此升级
无需重新生成文件。
其他插件的 API
ProxChat 向 Bukkit 的 ServicesManager 注册一个 ProxChatService。声明
softdepend: [ProxChat] 并延迟查找它:
ProxChatService prox = getServer().getServicesManager().load(ProxChatService.class);
if (prox != null) {
prox.setMode(Mode.SUPPRESSED); // 或 enable() / suppress() / disable()
prox.clearAll(); // 移除所有实时气泡,模式保持不变
}
每个方法都可以从任何线程调用;模式翻转是原子的。
已知问题 (0.3.0)
- 当你抬头直视上方时,你无法在第一人称视角下看到自己的气泡(客户端对自身乘客的渲染问题);按 F5 和其他玩家不受影响。
- 当挂载气泡时,发言者的原版名字标签不会被绘制(客户端行为);当最后一个气泡消失时会恢复。
- 发送给发送者的“消息太长”回复目前为法语;计划实现本地化消息。
- 在有玩家在线时停止服务器可能会记录一条无害的
Error occurred while disabling ProxChat。修复计划于 0.4.0 版本中推出。
Proximity Chat Bubble
Proximity text chat plugin for Folia and (probably) Paper servers
chat messages appear as floating speech bubbles above the player's head, readable only by players nearby.

Description
While the plugin is ON, regular chat no longer visible to server chat. Instead each message becomes a text bubble mounted above the speaker, visible to anyone within
a configurable radius (default 24 blocks, same world only).
Features
- True proximity — admission is server-authoritative: clients beyond the radius
never receive the bubble entity, so a modified client cannot read distant chat.
The client-side view range is only a render cull on top of that guarantee.
- Anonymous by design — no sender name appears on any surface, and message content
is never logged or written to disk. Bubbles are non-persistent display entities.
- Fail-closed — every failure path ends in "no bubble", never in leaked, frozen,
or truncated text.
- Three modes —
ON (bubbles replace chat), OFF (plugin inert, vanilla chat
untouched), SUPPRESSED (chat swallowed, all bubbles cleared). Switch live in-game, from console, or from another plugin via the API.
- Folia-native — fully region-thread-safe and declared
folia-supported; built
against the Folia scheduler APIs, which Paper also ships. (was built for folia event so compatibility for paper was not even tested)
- Hardened input — Unicode NFC normalization; control, invisible, and bidi
characters stripped; whitespace collapsed; a code-point length cap that rejects
overlong messages instead of truncating them. Bubble text is rendered as a literal
component, never parsed as markup.
- Rate-limited — a per-player minimum interval between accepted messages keeps
entity spawns and packet fan-out bounded.
- Live config —
/proxchat reload applies every value immediately. Out-of-range
values are clamped with a console warning; a config typo never blocks enabling.
Install
- Drop the jar into your server's
plugins/ folder.
- Restart. The plugin starts OFF on first boot — enable it with
/proxchat on.
The mode persists across restarts.
Requires Folia or Paper 26.1.2 or newer (Java 25 runtime).
Commands
/proxchat <status|on|off|suppress|clear|reload> — permission proxchat.admin
(default: op).
| Subcommand |
Effect |
status |
Current mode, live bubble counts, and a config summary |
on / off / suppress |
Switch mode (leaving ON clears every live bubble) |
clear |
Remove all live bubbles without changing the mode |
reload |
Re-read config.yml in place; lists any clamped values |
Configuration
Radius, bubble lifetime, stack depth, height, sneak-hide, max message length,
rate-limit interval and more — every key is documented in the generated config.yml,
applies live on /proxchat reload, and missing keys fall back to defaults so upgrades
never require regenerating the file.
API for other plugins
ProxChat registers a ProxChatService with Bukkit's ServicesManager. Declare
softdepend: [ProxChat] and look it up lazily:
ProxChatService prox = getServer().getServicesManager().load(ProxChatService.class);
if (prox != null) {
prox.setMode(Mode.SUPPRESSED); // or enable() / suppress() / disable()
prox.clearAll(); // remove every live bubble, mode untouched
}
Every method is callable from any thread; mode flips are atomic.
Known quirks (0.3.0)
- You can't see your own bubble in first person when looking straight up (client
rendering of self-passengers); F5 and other players are unaffected.
- The speaker's vanilla nametag isn't drawn while a bubble is mounted (client
behavior); it returns when the last bubble fades.
- The "message too long" reply shown to the sender is currently French; localizable
messages are planned.
- Stopping the server while players are online can log one harmless
Error occurred while disabling ProxChat. Fix planned for 0.4.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧