更新
一款现代化的 Minecraft Paper (1.21.8+) 插件,用于管理、展示和追踪服务器更新,让您的玩家随时掌握动态。轻松发布新闻、补丁说明或更新日志,确保每位玩家都能及时了解最新信息!
功能
/updates — 查看更新(按最新发布优先排序),支持点击导航进行分页浏览。
/update <message> — 管理员可发布新更新。支持使用 %nl% 或 \n 表示换行。
/updates clear — 管理员可清除所有更新。
/updates help — 显示所有命令。玩家仅看到玩家可用命令;管理员则能看到全部命令。
/updates toggle — 玩家可切换未读更新的登录通知开关。
未读更新追踪:如果玩家尚未查看过新更新,将在其登录时收到通知。
所有消息均可配置:同时支持 MiniMessage 格式和传统的 & 颜色代码。
可配置的命令钩子:发布更新时自动执行一个或多个服务器命令(非常适合集成 Discord)。
玩家数据(已读状态、开关状态)按 UUID 存储在独立文件中。
更新内容存储在专用的 YAML 文件中。
结构清晰且模块化的插件,欢迎随意 Fork 并根据需求扩展!
命令与权限
命令 权限 描述
/updates update.use 查看更新(支持分页及可点击的导航)
/updates help update.use 查看帮助面板
/updates toggle update.use 切换未读登录通知
/update <message> updates.admin 发布新更新
/updates clear updates.admin 清除所有更新
执行管理员命令需要 updates.admin 权限。
默认情况下,玩家可以使用 /updates、/updates help 和 /updates toggle。
配置
config.yml
updates-per-page: 5
messages:
no-permission: "&cYou do not have permission."
cleared: "&aAll updates cleared."
update-posted: "&aUpdate posted."
update-usage: "&eUsage: /update <message>"
join-unread: "<yellow>You have <green>{amount}</green> unread update(s)! Do <white>/updates</white>."
updates-header: "<gold>--- Updates (<white>{page}</white> of <white>{total}</white>) ---"
update-format: "<gray>#<white>{number}</white> <gray>by <green>{author}</green>:<reset>\n<white>{message}</white>"
toggle-on: "&aYou will no longer see unread join messages."
toggle-off: "&cYou will now see unread join messages."
no-updates: "&7No updates to show."
player-only: "&cThis command can only be used by players."
unknown-subcommand: "&cInvalid subcommand or page number. Do /updates help"
help-header: "<gold>--- Updates Help ---"
help-player: "&e/updates &7- Show updates\n&e/updates help &7- Show this panel\n&e/updates toggle &7- Toggle unread join msg"
help-admin: "&c/update <msg> &7- Post an update\n&c/updates clear &7- Clear all updates"
on-update-commands:
- "yourcommand {message}"
- "yourcommand {author}"
on-update-commands
添加一个或多个命令,以便在每次发布更新时从控制台运行。
支持 {message} 和 {author} 占位符。
示例:
on-update-commands:
- "say [Update] {author} posted: {message}"
- "discordsrv broadcast **Update:** {message} (by {author})"
用法
发布更新:
/update The server will restart soon%nl%Please finish your activities!
换行符:
在消息中使用 %nl% 或 \n。
清除更新:
/updates clear
查看更新:
/updates — 包含多页的可点击导航。
切换登录通知:
/updates toggle
玩家登录体验
如果玩家尚未查看最新的更新,他们会在登录时收到一条消息,告知有多少条未读更新,并提示使用 /updates。
一旦他们查看了更新,直到有新更新发布之前,他们将不会再收到该登录通知。
玩家可以使用 /updates toggle 来切换此登录通知。
Updates
A modern Minecraft Paper (1.21.8+) plugin for managing, displaying, and tracking server updates for your players. Easily post news, patch notes, or changelogs and ensure every player stays informed!
Features
/updates — View updates, newest first, with click-to-navigate pagination.
/update <message> — Admins can post new updates. Supports %nl% or \n for line breaks.
/updates clear — Admins can clear all updates.
/updates help — Shows all commands. Players see only player commands; admins see all.
/updates toggle — Players can toggle unread update join notifications.
Unread update tracking: Players are notified on join if they haven't seen new updates.
All messages configurable: Supports both MiniMessage and legacy & color codes.
Configurable command hooks: Run one or more server commands automatically when an update is posted (great for Discord integrations).
Player data (seen updates, toggle state) stored per-UUID in a separate file.
Updates stored in their own YAML file.
Clean, and modular plugin, feel free to fork and expand as you like!
Commands & Permissions
Command Permission Description
/updates updates.use View updates (pagination, clickable nav)
/updates help updates.use View help panel
/updates toggle updates.use Toggle unread join notification
/update <message> updates.admin Post a new update
/updates clear updates.admin Clear all updates
Permission updates.admin is required for admin commands.
Players by default can use /updates, /updates help, and /updates toggle.
Configuration
config.yml
updates-per-page: 5
messages:
no-permission: "&cYou do not have permission."
cleared: "&aAll updates cleared."
update-posted: "&aUpdate posted."
update-usage: "&eUsage: /update <message>"
join-unread: "<yellow>You have <green>{amount}</green> unread update(s)! Do <white>/updates</white>."
updates-header: "<gold>--- Updates (<white>{page}</white> of <white>{total}</white>) ---"
update-format: "<gray>#<white>{number}</white> <gray>by <green>{author}</green>:<reset>\n<white>{message}</white>"
toggle-on: "&aYou will no longer see unread join messages."
toggle-off: "&cYou will now see unread join messages."
no-updates: "&7No updates to show."
player-only: "&cThis command can only be used by players."
unknown-subcommand: "&cInvalid subcommand or page number. Do /updates help"
help-header: "<gold>--- Updates Help ---"
help-player: "&e/updates &7- Show updates\n&e/updates help &7- Show this panel\n&e/updates toggle &7- Toggle unread join msg"
help-admin: "&c/update <msg> &7- Post an update\n&c/updates clear &7- Clear all updates"
on-update-commands:
- "yourcommand {message}"
- "yourcommand {author}"
on-update-commands
Add one or more commands to run (from console) every time an update is posted.
Supports {message} and {author} placeholders.
Example:
on-update-commands:
- "say [Update] {author} posted: {message}"
- "discordsrv broadcast **Update:** {message} (by {author})"
Usage
Posting an update:
/update The server will restart soon%nl%Please finish your activities!
Line breaks:
Use %nl% or \n in your message.
Clearing updates:
/updates clear
Viewing updates:
/updates — includes clickable navigation for multiple pages.
Toggling join notifications:
/updates toggle
Player Join Experience
If a player has not seen the latest updates, they receive a join message telling them how many updates are unread and to use /updates.
Once they view the updates, they will not receive the join message again until new updates are posted.
Players can toggle this join notification with /updates toggle.
评论 0
登录后参与评分
还没有评论,来抢沙发吧