? 服务器新闻
Server News 是一款简单、轻量的 Minecraft 服务器插件,用于向玩家分享公告——无需刷屏聊天或强制弹出窗口。
当有新服务器新闻时,系统会温和地提醒玩家;玩家可随时通过 /news 命令阅读,并且插件会追踪哪些玩家已经读过。可选地,你可以奖励首次阅读新闻的玩家。
专为现代 Paper/Spigot 服务器构建,注重性能与简洁性。
✨ 功能特性
- ? 通过
/news 显示服务器公告
- ? 基于 UUID 追踪已阅读过新闻的玩家
- ? 自动加入提醒(支持配置延迟时间)
- ? 发布前预览公告(使用
testnews.yml)
- ? 阅读数据在服务器重启后持久保存
- ? 可为首次阅读者执行可选的奖励命令
- ? 可选的奖励音效
- ♻️ 无需重启服务器即可重载配置
- ?️ 基于权限的管理员控制
?? 命令
玩家命令
/news
查看当前服务器新闻并将该玩家标记为已读。
管理员命令
-
/news test
预览 testnews.yml 且不记录阅读状态
权限:shantekmc.servernews.test
-
/news reset
清除阅读列表(在发布新公告时使用)
权限:shantekmc.servernews.reset
-
/news list
显示有多少玩家已阅读新闻及其用户名
权限:shantekmc.servernews.list
-
/news reload
重载 config.yml、news.yml 和 testnews.yml
权限:shantekmc.servernews.reload
⚙️ 配置文件 (config.yml)
reward:
enabled: true
# 当玩家首次阅读新闻时执行的控制台命令
# %player% 会被替换为玩家名称
command: "eco give %player% 25"
delay-seconds: 5
sound:
enabled: true
name: "ENTITY_PLAYER_LEVELUP"
volume: 0.6
pitch: 1.2
messages:
rewarded: "&a保持知情有奖励。干得好!"
注意事项
- 奖励命令完全可自定义——可以是经济系统、物品、权限、宝箱钥匙或任何控制台命令。
- 奖励仅在每个新闻周期内触发一次。
- 所有配置值均可修改并通过
/news reload 实时重载。
? 新闻文件
news.yml
lines:
- "&6欢迎来到 Block Horizon!"
- "&7探索新的购物区吧。"
- "&e玩得开心,公平竞技!"
testnews.yml
用于在正式发布前预览公告。
lines:
- "&d[测试] &7这是下一条公告的样子。"
- "&7确保颜色和格式显示正确。"
? 工作原理
- 管理员更新
news.yml
- 管理员运行
/news reload 和 /news reset
- 未阅读过的玩家在加入服务器时会收到提醒
- 玩家运行
/news
- 显示新闻并将玩家标记为已读
- 首次阅读时发放可选奖励
无垃圾信息,无强制界面。只需清晰高效的沟通。
? Server News
Server News is a simple, lightweight Minecraft server plugin for sharing announcements with your players - without spamming chat or forcing popups.
Players are gently reminded when new server news is available, can read it at any time using /news, and the plugin tracks who has already read it. Optionally, you can reward players the first time they read the news.
Built for modern Paper/Spigot servers with performance and simplicity in mind.
✨ Features
- ? Display server announcements via
/news
- ? Track which players have already read the news (UUID-based)
- ? Automatic join reminders (with configurable delays)
- ? Test announcements before publishing (
testnews.yml)
- ? Reader data persists across restarts
- ? Optional reward command for first-time readers
- ? Optional reward sound effect
- ♻️ Reloadable without restarting the server
- ?️ Permission-based admin controls
?? Commands
Player Commands
/news
Reads the current server news and marks the player as having read it.
Admin Commands
-
/news test
Preview testnews.yml without tracking reads
Permission: shantekmc.servernews.test
-
/news reset
Clears the reader list (use when publishing new announcements)
Permission: shantekmc.servernews.reset
-
/news list
Shows how many players have read the news and their names
Permission: shantekmc.servernews.list
-
/news reload
Reloads config.yml, news.yml, and testnews.yml
Permission: shantekmc.servernews.reload
⚙️ Configuration (config.yml)
reward:
enabled: true
# Console command to run when a player reads the news for the first time
# %player% is replaced with the player name
command: "eco give %player% 25"
delay-seconds: 5
sound:
enabled: true
name: "ENTITY_PLAYER_LEVELUP"
volume: 0.6
pitch: 1.2
messages:
rewarded: "&aPay-day for keeping informed. Good work!"
Notes
- The reward command is fully customizable - economy, items, permissions, crate keys, or any console command.
- Rewards only fire once per news cycle.
- All configuration values can be changed and reloaded live using
/news reload.
? News Files
news.yml
lines:
- "&6Welcome to Block Horizon!"
- "&7Check out the new shopping district."
- "&eHave fun and play fair!"
testnews.yml
Used for previewing announcements before publishing them live.
lines:
- "&d[Test] &7This is what the next announcement will look like."
- "&7Make sure colors and formatting look right."
? How It Works
- Admin updates
news.yml
- Admin runs
/news reload and /news reset
- Players are reminded on join if they haven’t read it
- Players run
/news
- News is shown and the player is marked as read
- Optional reward is given on first read
No spam. No forced UI. Just clean communication.
评论 0
登录后参与评分
还没有评论,来抢沙发吧