UpdateBeacon
一款服务端 Minecraft 模组,可自动检查已安装模组在 Modrinth 和 CurseForge 上的更新,并通知你的管理员——还可以为你下载并应用这些更新。无需客户端安装。
功能
更新检测
- 将每个已安装的模组与 Modrinth 和 CurseForge(通过添加免费 API 密钥启用 CurseForge)进行比对检查。
- 基于哈希的匹配 — 将每个已安装 jar 文件的 SHA-512 值与 Modrinth 的文件记录(以及 CurseForge 指纹)进行比较,消除因版本字符串差异导致的误报(例如
1.4.147 与 1.4.147+v240613)。
- 自动跳过嵌套和捆绑的子模组。
- 按模组的更新渠道 — 为每个模组独立跟踪
release、beta 或 alpha 渠道。
- 锁定 (Pins) — 将模组冻结在当前版本,以抑制更新通知,直到你取消锁定。
通知
- 控制台 — 每次检查时记录可用的更新。
- 游戏内聊天 — 向符合条件的操作员发送带有彩色输出和可点击下载链接的消息。
- 玩家登录 — 操作员加入服务器时会看到任何待处理的更新。
- Webhook — 可同时向任意数量的端点发布消息(见下文)。
下载与应用
- 将待处理的更新下载到暂存区,并根据源端预期的哈希值进行验证。
- 在下一次服务器停止时应用暂存的 jar 文件,或者运行定时的 应用倒计时 以重启服务器。
- 替换前的 jar 文件会先备份,因此任何更新都可以 回滚。
维护
- 完整性扫描 — 根据已发布的哈希值验证已安装的 jar 文件。
- 热重载 — 无需重启即可重新读取配置文件。
- 可选的 定时检查,按重复计时器执行。
命令
所有命令均为 /updatebeacon 开头,需要权限等级 2(op)。
| 命令 |
描述 |
/updatebeacon check |
运行全新的更新检查并显示结果 |
/updatebeacon list |
显示上次检查的缓存结果 |
/updatebeacon info <modid> |
获取单个模组的详细信息、渠道及直接下载链接 |
/updatebeacon scan |
完整性扫描 — 根据已发布的哈希值验证已安装的 jar 文件 |
/updatebeacon download |
将所有待处理的更新下载到暂存区 |
/updatebeacon staged |
显示已下载并等待应用的更新 |
/updatebeacon apply [seconds] |
立即应用暂存的更新,或开始重启倒计时 |
/updatebeacon apply cancel |
取消正在运行的应用倒计时 |
/updatebeacon rollback <modid> |
从备份中恢复模组的先前 jar 文件 |
/updatebeacon pin <modid> |
将模组锁定在当前版本(抑制更新) |
/updatebeacon unpin <modid> |
解除锁定 |
/updatebeacon ignore <modid> |
完全停止检查某个模组 |
/updatebeacon unignore <modid> |
恢复对某个模组的检查 |
/updatebeacon channel <modid> <release|beta|alpha|any> |
设置模组的更新渠道 |
/updatebeacon reload |
热重载 updatebeacon.toml,无需重启 |
Webhooks
为每个目标添加一个 [[webhooks]] 块,每个块包含其自己的 URL 和格式:
[[webhooks]]
url = "https://discord.com/api/webhooks/..."
format = "discord_embed"
[[webhooks]]
url = "https://your-endpoint.com/hook"
format = "generic_json"
支持的格式:
discord_embed — Discord Webhook 的丰富嵌入内容
generic_json — 用于自定义集成的简单 JSON 负载
安装
将与你的 Minecraft 版本和加载器匹配的模组 jar 文件放入服务器的 mods/ 文件夹中,然后启动服务器一次以生成配置文件。
要求:
- 受支持的 Minecraft 版本(参见上方表格)
- Fabric Loader 配合 Fabric API,或 NeoForge
- 免费的 CurseForge API 密钥 (可选 — 仅在进行 CurseForge 更新检查时需要)
配置
首次运行时生成于 config/updatebeacon.toml:
[general]
enabled = true
check_on_startup = true
check_interval_minutes = 0 # 0 = 禁用;任何正值 = 检查之间的分钟数
[ignore]
mod_ids = [] # 要跳过的模组 ID,例如 ["mymod", "anothermod"]
quiet_when_no_updates = true # 当所有内容均为最新时,抑制所有通知
[console]
enabled = true
[chat]
enabled = true
ops_only = true # 仅通知服务器管理员
permission_level = 2 # 接收通知所需的最低权限等级
# 为每个目标添加一个 [[webhooks]] 块。支持的格式:discord_embed, generic_json
# [[webhooks]]
# url = ""
# format = "discord_embed"
[downloads]
auto_download = false # 每次检查后自动下载更新
auto_apply = false # 在服务器停止时将暂存的 jar 文件交换到 mods/ 目录
backup = true # 将替换后的 jar 文件保留在 .updatebeacon/backup/ 中
allowed_mod_ids = [] # 空 = 所有模组均可选;非空 = 白名单
apply_countdown_seconds = 300 # /updatebeacon apply 的默认倒计时长度
[curseforge]
# 在 https://console.curseforge.com/ 获取免费 API 密钥
api_key = "" # 留空则仅检查 Modrinth
# 按模组的更新渠道:"release"、"beta" 或 "alpha"
[mod_policy]
# lithium = "beta"
# 锁定模组以防止更新通知。使用 /updatebeacon pin <modid>
[mod_pins]
暂存的下载文件和备份位于 .updatebeacon/staged/ 和 .updatebeacon/backup/ 下。
注意事项
模组默认在 Modrinth 上进行匹配;设置 curseforge.api_key 后,将启用对 CurseForge 的检查。未在任一平台发布的模组将被静默跳过。
UpdateBeacon
A server-side Minecraft mod that automatically checks for updates to your installed mods on Modrinth and CurseForge, then notifies your operators — and can download and apply the updates for you. No client installation required.
Features
Update detection
- Checks every installed mod against both Modrinth and CurseForge (CurseForge is enabled by adding a free API key).
- Hash-based matching — compares the SHA-512 of each installed jar against Modrinth's file records (and CurseForge fingerprints), eliminating false positives from version-string quirks (e.g.
1.4.147 vs 1.4.147+v240613).
- Nested and bundled sub-mods are skipped automatically.
- Per-mod update channels — track
release, beta, or alpha independently for each mod.
- Pins — freeze a mod at its current version to silence update notices until you unpin it.
Notifications
- Console — logs available updates on every check.
- In-game chat — colored output with clickable download links, sent to eligible ops.
- Player login — ops see any pending updates when they join.
- Webhooks — post to any number of endpoints at once (see below).
Downloads & applying
- Download pending updates to a staging area with hash verification against the source's expected hash.
- Apply staged jars on the next server stop, or run a timed apply countdown that restarts the server for you.
- Replaced jars are backed up first, so any update can be rolled back.
Maintenance
- Integrity scan — verify your installed jars against their published hashes.
- Hot reload — re-read the config without restarting.
- Optional scheduled checks on a repeating timer.
Commands
All commands are under /updatebeacon and require permission level 2 (op).
| Command |
Description |
/updatebeacon check |
Run a fresh update check and display results |
/updatebeacon list |
Show cached results from the last check |
/updatebeacon info <modid> |
Detailed info, channel, and a direct download link for one mod |
/updatebeacon scan |
Integrity scan — verify installed jars against published hashes |
/updatebeacon download |
Download all pending updates to the staging area |
/updatebeacon staged |
Show what is downloaded and waiting to be applied |
/updatebeacon apply [seconds] |
Apply staged updates now, or start a restart countdown |
/updatebeacon apply cancel |
Cancel a running apply countdown |
/updatebeacon rollback <modid> |
Restore a mod's previous jar from backup |
/updatebeacon pin <modid> |
Pin a mod at its current version (suppress updates) |
/updatebeacon unpin <modid> |
Remove a pin |
/updatebeacon ignore <modid> |
Stop checking a mod entirely |
/updatebeacon unignore <modid> |
Resume checking a mod |
/updatebeacon channel <modid> <release|beta|alpha|any> |
Set a mod's update channel |
/updatebeacon reload |
Hot-reload updatebeacon.toml without restarting |
Webhooks
Add one [[webhooks]] block per target, each with its own URL and format:
[[webhooks]]
url = "https://discord.com/api/webhooks/..."
format = "discord_embed"
[[webhooks]]
url = "https://your-endpoint.com/hook"
format = "generic_json"
Supported formats:
discord_embed — rich embed for Discord webhooks
generic_json — simple JSON payload for custom integrations
Installation
Drop the mod jar that matches your Minecraft version and loader into your server's mods/ folder, then start the server once to generate the config.
Requirements:
- A supported Minecraft version (see table above)
- Fabric Loader with Fabric API, or NeoForge
- A free CurseForge API key (optional — only needed for CurseForge update checks)
Configuration
Generated at config/updatebeacon.toml on first run:
[general]
enabled = true
check_on_startup = true
check_interval_minutes = 0 # 0 = disabled; any positive value = minutes between checks
[ignore]
mod_ids = [] # mod IDs to skip, e.g. ["mymod", "anothermod"]
quiet_when_no_updates = true # suppress all notifications when everything is up to date
[console]
enabled = true
[chat]
enabled = true
ops_only = true # only notify server operators
permission_level = 2 # minimum permission level to receive notifications
# Add one [[webhooks]] block per target. Supported formats: discord_embed, generic_json
# [[webhooks]]
# url = ""
# format = "discord_embed"
[downloads]
auto_download = false # automatically download updates after each check
auto_apply = false # swap staged jars into mods/ on server stop
backup = true # keep replaced jars in .updatebeacon/backup/
allowed_mod_ids = [] # empty = all mods eligible; non-empty = whitelist
apply_countdown_seconds = 300 # default countdown length for /updatebeacon apply
[curseforge]
# Get a free API key at https://console.curseforge.com/
api_key = "" # leave blank to check Modrinth only
# Per-mod update channel: "release", "beta", or "alpha"
[mod_policy]
# lithium = "beta"
# Pin a mod to prevent update notifications. Use /updatebeacon pin <modid>
[mod_pins]
Staged downloads and backups live under .updatebeacon/staged/ and .updatebeacon/backup/.
Notes
Mods are matched on Modrinth by default; CurseForge checks turn on once you set a curseforge.api_key. Mods that aren't published on either platform are silently skipped.
评论 0
登录后参与评分
还没有评论,来抢沙发吧