通过定时器向玩家发送自动消息 —— 包括聊天公告、操作栏提示、Boss 进度条和屏幕标题。每种消息类型均可完全自定义,所有配置仅涉及两个 YAML 文件,且无需重启服务器即可应用更改。
消息类型
聊天 (Chat)
向聊天窗口发送一行或多行文本。text 列表中的每一项可以是单独的消息,也可以根据 split-lines 设置合并为一条。支持使用 centered: true 进行像素级精确居中。
- type: CHAT
text:
- "<gradient:#f0c040:#ff8c00><bold> ★ Welcome to the server! ★ </bold></gradient>"
- "<gray>Currently online: <green>{online}<gray>/<red>{max_online}"
- "<dark_gray>Server TPS: {tps}"
split-lines: true
centered: false
操作栏 (Action bar)
在快捷栏上方显示文本。duration 单位为刻(ticks)—— 插件会自动每秒刷新一次,以防止消息在显示中途消失。
- type: ACTIONBAR
text: "<gradient:#00c6ff:#0072ff>⏱ {server_time} | {online}/{max_online} online | TPS: {tps}</gradient>"
duration: 60
Boss 进度条 (Boss bar)
在屏幕顶部显示进度条。你可以配置颜色、样式、填充量、停留时长以及动画效果。
- type: BOSSBAR
text: "<red><bold>⚠ PvP is enabled in this area!</bold></red>"
color: RED
style: SEGMENTED_10
progress: 1.0
duration: 8
animation: PULSE
颜色 — PINK BLUE RED GREEN YELLOW PURPLE WHITE
样式 — SOLID SEGMENTED_6 SEGMENTED_10 SEGMENTED_12 SEGMENTED_20
动画:
|
|
NONE |
瞬间出现并消失 |
FADE_IN |
进度条从 0 填充至配置的值 |
FADE_OUT |
进度条排空至 0 后隐藏 |
PULSE |
在可见期间于 40% 和 100% 填充之间振荡 |
标题与副标题 (Title & subtitle)
向屏幕中心发送大号标题和小号副标题。时间单位均为刻(20 刻 = 1 秒)。
- type: TITLE
title: "<gradient:#a18cd1:#fbc2eb><bold>{player}</bold></gradient>"
subtitle: "<gray>Welcome back. There are <green>{online}</green> players online.</gray>"
fade-in: 20
stay: 70
fade-out: 20
消息组
消息按组组织。每个组运行其独立的时间调度器,这意味着它们互不干扰,你可以创建任意数量的组。
message-groups:
announcements:
enabled: true
interval: 120 # 发送频率,单位为秒
random-order: false # 按顺序循环,或随机选择
worlds: [] # 限制特定世界,为空表示所有世界
permission-required: "" # 仅拥有此权限的玩家接收该消息
messages:
- ...
- ...
世界过滤 — 列出世界名称以将组限制在这些世界中。其他世界的玩家将不会收到消息。
worlds:
- world_nether
- world_the_end
权限过滤 — 将 permission-required 设置为权限节点。只有拥有该权限的玩家才会接收来自该组的消息。适用于 VIP 公告、员工通知等。
permission-required: "server.vip"
拥有 automessages.bypass 权限的玩家将被排除在所有组之外,无论设置如何。
格式化
支持三种格式化系统,可以在任何消息中自由混合使用。
旧版代码 (Legacy codes) — &a green &l bold &r reset 等。
十六进制颜色 (Hex colors) — &#FF5500text
MiniMessage — 完整的 Adventure 标签集,包括交互元素:
Colors and gradients:
<#FF5500>text</#FF5500>
<gradient:#f0c040:#ff4500>text</gradient>
<rainbow>text</rainbow>
Decorations:
<bold>, <italic>, <underlined>, <strikethrough>, <obfuscated>
Click events:
<click:open_url:'https://discord.gg/example'>Join Discord</click>
<click:suggest_command:'/vote'>Click to vote</click>
<click:run_command:'/rules'>View rules</click>
<click:copy_to_clipboard:'play.example.com'>Copy IP</click>
Hover tooltips:
<hover:show_text:'<green>Opens the store!'>Store</hover>
点击和悬停标签仅在聊天消息中有效 —— 它们在操作栏、Boss 进度条或标题中无效。
占位符
以下占位符无需安装额外插件即可使用:
| 占位符 |
描述 |
{player} |
玩家用户名 |
{displayname} |
玩家显示名称 |
{online} |
当前在线玩家数量 |
{max_online} |
服务器最大玩家上限 |
{world} |
玩家当前所在的世界名称 |
{server_time} |
当前服务器时间 (HH:mm) |
{date} |
当前服务器日期 (dd.MM.yyyy) |
{tps} |
服务器 TPS,根据数值显示绿/黄/红颜色 |
{ping} |
玩家的延迟(毫秒) |
{health} / {max_health} |
玩家当前生命值和最大生命值 |
{level} |
玩家的经验等级 |
{x} {y} {z} |
玩家的方块坐标 |
如果安装了 PlaceholderAPI,所有 %expansion_placeholder% 值将自动生效 —— 无需额外配置。
命令
| 命令 |
描述 |
/am reload |
在不重启服务器的情况下重新加载 config.yml 和 messages.yml |
/am list |
显示所有组、它们的间隔、消息数量和当前状态 |
/am toggle <group> |
在服务器运行时启用或禁用某个组 |
/am send <group> |
立即向所有玩家发送该组的下一条消息 |
/am send <group> <#> |
按索引(从 1 开始)发送特定消息 |
/am help |
显示命令概览 |
别名:/am, /amsg
权限
| 权限 |
默认值 |
描述 |
automessages.admin |
op |
完全访问所有命令 |
automessages.reload |
op |
/am reload |
automessages.list |
op |
/am list |
automessages.toggle |
op |
/am toggle |
automessages.send |
op |
/am send |
automessages.bypass |
false |
永不接收任何自动消息 |
配置文件
首次运行时,会在 plugins/AutoMessages/ 目录下生成两个文件:
config.yml —— 包含所有消息组、间隔时间以及插件全局设置(如前缀、世界过滤器和控制台日志记录)。
messages.yml —— 插件向玩家和管理员发送的所有系统消息(包括重载确认、切换反馈、帮助文本等)。完全支持 MiniMessage 格式。
要求
- PaperMC 1.18 – 1.21.x
- Java 17+
- PlaceholderAPI — 可选
Send automatic messages to your players on a timer — chat announcements, action bar tips, boss bars, and screen titles. Each message type is fully configurable, everything lives in two YAML files, and you don't need to restart the server to apply changes.
Message types
Chat
Sends one or more lines to the chat. Each entry in the text list can be a separate message or combined into one, depending on the split-lines setting. Optional pixel-accurate centering is available with centered: true.
- type: CHAT
text:
- "<gradient:#f0c040:#ff8c00><bold> ★ Welcome to the server! ★ </bold></gradient>"
- "<gray>Currently online: <green>{online}<gray>/<red>{max_online}"
- "<dark_gray>Server TPS: {tps}"
split-lines: true
centered: false
Action bar
Displays text above the hotbar. duration is in ticks — the plugin automatically refreshes it every second so it doesn't disappear mid-display.
- type: ACTIONBAR
text: "<gradient:#00c6ff:#0072ff>⏱ {server_time} | {online}/{max_online} online | TPS: {tps}</gradient>"
duration: 60
Boss bar
Shows a progress bar at the top of the screen. You can configure the color, bar style, fill amount, how long it stays, and how it animates.
- type: BOSSBAR
text: "<red><bold>⚠ PvP is enabled in this area!</bold></red>"
color: RED
style: SEGMENTED_10
progress: 1.0
duration: 8
animation: PULSE
Colors — PINK BLUE RED GREEN YELLOW PURPLE WHITE
Styles — SOLID SEGMENTED_6 SEGMENTED_10 SEGMENTED_12 SEGMENTED_20
Animations:
|
|
NONE |
appears and disappears instantly |
FADE_IN |
progress bar fills in from 0 to the configured value |
FADE_OUT |
progress bar drains to 0 before hiding |
PULSE |
oscillates between 40% and 100% fill while visible |
Title & subtitle
Sends a large title and smaller subtitle to the center of the screen. Timing is in ticks (20 ticks = 1 second).
- type: TITLE
title: "<gradient:#a18cd1:#fbc2eb><bold>{player}</bold></gradient>"
subtitle: "<gray>Welcome back. There are <green>{online}</green> players online.</gray>"
fade-in: 20
stay: 70
fade-out: 20
Message groups
Messages are organized into groups. Each group runs its own independent scheduler, meaning they don't interfere with each other and you can have as many as you want.
message-groups:
announcements:
enabled: true
interval: 120 # how often to send, in seconds
random-order: false # cycle in order, or pick randomly
worlds: [] # limit to specific worlds, empty = all
permission-required: "" # only players with this permission receive it
messages:
- ...
- ...
World filtering — list world names to restrict a group to those worlds only. Players in other worlds won't receive the message.
worlds:
- world_nether
- world_the_end
Permission filtering — set permission-required to a permission node. Only players who have that permission will receive the messages from that group. Useful for VIP announcements, staff notices, etc.
permission-required: "server.vip"
Players with automessages.bypass are excluded from all groups regardless of settings.
Formatting
Three formatting systems are supported and can be mixed freely in any message.
Legacy codes — &a green &l bold &r reset and so on.
Hex colors — &#FF5500text
MiniMessage — the full Adventure tag set, including interactive elements:
Colors and gradients:
<#FF5500>text</#FF5500>
<gradient:#f0c040:#ff4500>text</gradient>
<rainbow>text</rainbow>
Decorations:
<bold>, <italic>, <underlined>, <strikethrough>, <obfuscated>
Click events:
<click:open_url:'https://discord.gg/example'>Join Discord</click>
<click:suggest_command:'/vote'>Click to vote</click>
<click:run_command:'/rules'>View rules</click>
<click:copy_to_clipboard:'play.example.com'>Copy IP</click>
Hover tooltips:
<hover:show_text:'<green>Opens the store!'>Store</hover>
Click and hover tags only work in chat messages — they have no effect in action bars, boss bars, or titles.
Placeholders
These are available without any additional plugins:
| Placeholder |
Description |
{player} |
Player's username |
{displayname} |
Player's display name |
{online} |
Number of players currently online |
{max_online} |
Server's max player limit |
{world} |
Name of the player's current world |
{server_time} |
Current server time in HH:mm |
{date} |
Current server date in dd.MM.yyyy |
{tps} |
Server TPS, color-coded green/yellow/red |
{ping} |
Player's ping in milliseconds |
{health} / {max_health} |
Player's current and max health |
{level} |
Player's XP level |
{x} {y} {z} |
Player's block coordinates |
If PlaceholderAPI is installed, all %expansion_placeholder% values work automatically — no extra configuration needed.
Commands
| Command |
Description |
/am reload |
Reload config.yml and messages.yml without restarting |
/am list |
Show all groups, their interval, message count, and current status |
/am toggle <group> |
Enable or disable a group while the server is running |
/am send <group> |
Send the next message from a group to all players immediately |
/am send <group> <#> |
Send a specific message by index (1-based) |
/am help |
Show command overview |
Aliases: /am, /amsg
Permissions
| Permission |
Default |
Description |
automessages.admin |
op |
Full access to all commands |
automessages.reload |
op |
/am reload |
automessages.list |
op |
/am list |
automessages.toggle |
op |
/am toggle |
automessages.send |
op |
/am send |
automessages.bypass |
false |
Never receives any auto-messages |
Configuration files
Two files are generated on first run inside plugins/AutoMessages/:
config.yml — all message groups, intervals, and plugin-wide settings like prefix, world filters, and console logging.
messages.yml — every system message the plugin sends to players and admins (reload confirmation, toggle feedback, help text, etc.). Fully supports MiniMessage formatting.
Requirements
- PaperMC 1.18 – 1.21.x
- Java 17+
- PlaceholderAPI — optional
评论 0
登录后参与评分
还没有评论,来抢沙发吧