OverHeadMessage 是一款轻量级的 Leaf/Paper 插件,它利用现代的 TextDisplay(文本显示)实体将玩家的聊天消息直接显示在头顶上方——并附带平滑动画、十六进制/分组颜色以及内置的 AFK 系统。
当玩家在聊天中输入内容时,其消息会平滑地出现在头顶上方,随着玩家行走而跟随移动,停留时会轻轻上下浮动,随后向上飞起并淡出消失。不使用盔甲架,不进行 NMS 底层 hack,无卡顿。
功能特性
- 头顶聊天 — 每条聊天消息都以
TextDisplay 的形式悬浮在发送者头顶,作为乘客附加到玩家身上,从而完美跟随玩家移动。
- 流畅动画 — 出现时平滑放大,空闲时轻柔且无闪烁的浮动效果,消失时向上飞起并缩小。发送新消息时,会先播放旧消息的退出动画,再显示新消息。
- 丰富色彩 — 支持
& 传统代码和行内 #RRGGBB 十六进制颜色。在消息开头添加 ! 可切换至独立颜色(且 ! 本身会被隐藏)。
- 按分组配色 — 安装 LuckPerms 后,可通过简单的优先级列表和覆盖规则为每个权限组设置专属的消息颜色。
- AFK 系统 — 经过可配置的空闲时间后,会在头顶显示随机短语及实时计时器(格式如
30s → 1m → 1h 2m)。任何移动、交互或聊天行为都会立即清除该提示。
- PlaceholderAPI 支持 — 可在任意位置暴露 AFK 标签(如标签页列表、计分板、姓名牌插件等)。
- 极致轻量 — 性能分析显示其占用单个服务器线程约 0.1% 的资源。无重型循环,无实体泄漏,在玩家退出、死亡和服务端关闭时均会彻底清理。
- 版本兼容 — 可选视觉特性均有保护机制,因此插件在不同构建版本上能优雅降级,而非直接崩溃。
颜色与分组
设置一个默认颜色和一个单独的 with_exclamation 颜色(用于以 ! 开头的消息)。如果安装了 LuckPerms,group_priority 决定哪个权限组生效,而 group_overrides 允许每个组定义自己的颜色。未包含在这些组中的玩家将直接使用默认颜色。
AFK 与 PlaceholderAPI
安装 PlaceholderAPI 后,OverHeadMessage 注册了以下占位符:
%ohm_afk% — 玩家处于 AFK 状态时显示带颜色的 AFK 标签,否则为空
%ohm_afk_time% — 自适应的 AFK 时长,例如 1h 2m
%ohm_afk_state% — true 或 false
该插件不会自行编辑标签页列表 —— 只需将 %ohm_afk% 放置在你想要的位置即可。
命令与权限
/ohm reload — 重新加载配置文件
/ohm status — 显示当前设置
- 权限:
overheadmessage.admin(默认:op)
兼容性
专为 Leaf/Paper 1.21.x 和 Java 21 构建,使用稳定的 Bukkit/Paper API。LuckPerms 和 PlaceholderAPI 为可选的软依赖 —— 即使没有它们,插件也能正常运行,并在缺失时打印清晰的控制台提示(含下载链接)。
安装方法
- 将 jar 文件放入你的
plugins/ 文件夹中。
- (可选) 安装 LuckPerms 以实现按分组配色。
- (可选) 安装 PlaceholderAPI 以启用 AFK 占位符。
- 重启服务端,编辑
config.yml,然后运行 /ohm reload。
由 ZiTr_ 制作。
OverHeadMessage is a lightweight Leaf/Paper plugin that mirrors a player's chat message right above their head using a modern TextDisplay entity — complete with smooth animations, hex/group colors, and a built-in AFK system.
When a player types in chat, their message smoothly appears over their head, rides along with them as they walk, gently bobs while it lingers, then flies up and fades away. No ArmorStands, no NMS hacks, no lag.
What it does
- Overhead chat — every chat message floats above the sender as a
TextDisplay, attached as a passenger so it follows the player perfectly.
- Clean animations — a smooth scale-up on appear, gentle flicker-free idle bobbing, and a fly-up + shrink on disappear. Sending a new message instantly plays the old one's exit before showing the new one.
- Rich colors — supports both
& legacy codes and inline #RRGGBB hex. Starting a message with ! switches it to a separate color (and the ! itself is hidden).
- Per-group colors — with LuckPerms installed, give each rank its own message colors through a simple priority list and overrides.
- AFK system — after a configurable idle time, a random phrase plus a live timer (
30s → 1m → 1h 2m) appears over the head. Any movement, interaction, or chat clears it instantly.
- PlaceholderAPI support — expose an AFK tag anywhere you want (tab list, scoreboard, nametag plugin, and more).
- Featherweight — profiled at roughly 0.1% of a single server thread. No heavy loops, no entity leaks, everything cleaned up on quit, death, and shutdown.
- Version-tolerant — optional visual features are guarded, so the plugin degrades gracefully instead of crashing on different builds.
Colors and groups
Set a default color and a separate with_exclamation color (used when a message begins with !). If LuckPerms is present, group_priority decides which rank wins, and group_overrides lets each group define its own colors. Players outside those groups simply use the defaults.
AFK and PlaceholderAPI
When PlaceholderAPI is installed, OverHeadMessage registers these placeholders:
%ohm_afk% — the colorized AFK tag while the player is AFK, empty otherwise
%ohm_afk_time% — adaptive AFK time such as 1h 2m
%ohm_afk_state% — true or false
The plugin never edits the tab list on its own — just place %ohm_afk% wherever you like.
Commands and permissions
/ohm reload — reload the configuration
/ohm status — show the current settings
- Permission:
overheadmessage.admin (default: op)
Compatibility
Built for Leaf/Paper 1.21.x on Java 21, using the stable Bukkit/Paper API. LuckPerms and PlaceholderAPI are optional soft-dependencies — the plugin runs fine without them and prints a clear console notice (with download links) if they are missing.
Installation
- Drop the jar into your
plugins/ folder.
- (Optional) Install LuckPerms for per-group colors.
- (Optional) Install PlaceholderAPI for the AFK placeholders.
- Restart, edit
config.yml, and run /ohm reload.
Made by ZiTr_.
评论 0
登录后参与评分
还没有评论,来抢沙发吧