Updates

插件

· 作者 d15c07d

一款适用于现代 Minecraft Paper(1.21.8+)的插件,用于管理、展示和跟踪服务器更新信息,让您的玩家随时掌握动态。轻松发布新闻、补丁说明或更新日志,确保每位玩家都能及时了解最新内容!

0 本站下载 0 关注 更新于 1 年前

最新 1.0.1 · 1.21.10 · Paper / Purpur

一键开服(送7天)

更新

一款现代化的 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 来切换此登录通知。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源