GeyserUpdater
GeyserMC / Floodgate 的自动更新插件。支持 Spigot(及其分支如 Paper)、BungeeCord 和 Velocity。
功能
- 从 Jenkins/download API 获取 GeyserMC 和 Floodgate 的最新稳定版本,并覆盖 plugins 目录中现有的 JAR 文件
- 获取最新的 MCXboxBroadcast(来自 Modrinth)并将其放置在 Geyser 扩展文件夹中(可选)
- 自动检查更新
- 在服务器启动时
- 按指定间隔(例如每 12 小时)
- 当拥有特定权限的玩家登录时(可启用/禁用)
- 手动命令:
/geyserupdate(权限:geyserupdater.admin) - 可配置的语言、消息、目标、间隔和重启命令
构建
- 前置要求:Java 17, Maven 3.8+
- 说明:
- 在你克隆仓库的目录中运行
mvn package - 产物:
spigot/target/GeyserUpdater-Spigot-1.0.0.jarbungee/target/GeyserUpdater-Bungee-1.0.0.jarvelocity/target/GeyserUpdater-Velocity-1.0.0.jar
- 在你克隆仓库的目录中运行
安装
- 将适合你服务器平台的相应 JAR 文件放入 plugins 文件夹
- 启动服务器以生成
config.yml文件(它将与此 README 中包含的默认配置相同) - 插件通过在 plugins 目录中搜索文件名包含 "geyser" 或 "floodgate" 的文件来自动检测现有的 Geyser / Floodgate JAR 文件
- 如果未找到现有 JAR 文件,它将使用标准名称创建新的 JAR 文件(例如
Geyser-Spigot.jar,floodgate-velocity.jar)
- 如果未找到现有 JAR 文件,它将使用标准名称创建新的 JAR 文件(例如
命令与权限
/geyserupdate- 描述:立即运行一次更新检查
- 权限:
geyserupdater.admin
配置文件 (config.yml)
enabled: 启用或禁用插件language: 语言设置 (ja/en/de/ko,默认值:ja)checkOnStartup: 启用或禁用启动时的更新检查periodic.enabled: 启用或禁用周期性更新检查periodic.intervalHours: 定期检查的间隔(以小时为单位)adminLogin.enabled: 启用或禁用特权玩家登录时的更新检查adminLogin.permission: 触发登录检查的权限(默认值:geyserupdater.admin)targets.geyser | targets.floodgate | targets.mcxboxbroadcast: 选择要更新的插件postUpdate.notifyConsole: 更新后通知控制台postUpdate.notifyPlayersWithPermission: 向拥有权限的玩家发送游戏内聊天通知postUpdate.runRestartCommand: 更新后自动执行重启命令postUpdate.restartCommand: 要执行的重启命令(例如restart或end)messages.<lang>.*: 自定义消息(例如messages.ja.*)- 为了兼容性,当
language=ja时也会读取messages.*
- 为了兼容性,当
工作原理
- 下载 URL:
- Geyser:
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/{platform} - Floodgate:
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/{platform} - MCXboxBroadcast:
https://api.modrinth.com/v2/project/mcxboxbroadcast/version {platform}为spigot|bungeecord|velocity
- Geyser:
- 最新 JAR 被下载到临时文件中,并将其 SHA-256 哈希值与现有 JAR 进行比较
- 如果哈希值相同,则视为“已是最新”,不会替换文件
- 如果不同,则使用原子替换操作覆盖现有文件
- 应用更新后需要重启服务器或代理
- 若要启用自动重启,请将
postUpdate.runRestartCommand设置为true并将restartCommand配置为匹配你的环境
- 若要启用自动重启,请将
- MCXboxBroadcast 放置在 Geyser 扩展文件夹中
- 示例:
plugins/Geyser-Spigot/extensions
- 示例:
注意事项 / 已知限制
- 如果因网络问题或其他错误导致下载失败,现有的插件文件不会受到影响
- 如果 Geyser/Floodgate 文件具有不寻常的名称或不在 plugins 文件夹的直接子目录中,插件将无法检测到它们(它仅扫描 plugins 目录根目录下的 *.jar 文件)
- MCXboxBroadcast 始终放置在
plugins/Geyser-Spigot/extensions - 插件不显示版本号;它仅依赖哈希比较来确定是否有可用更新
许可证
- Apache License 2.0
GeyserUpdater
An automatic updater plugin for GeyserMC / Floodgate. Supports Spigot (and forks like Paper), BungeeCord, and Velocity.
Features
- Fetches the latest stable versions of GeyserMC and Floodgate from the Jenkins/download API and overwrites the existing JARs in the plugins directory
- Fetches the latest MCXboxBroadcast (from Modrinth) and places it in the Geyser extensions folder (optional)
- Automatic update checks
- On server startup
- At a specified interval (e.g., every 12 hours)
- When a player with a specific permission logs in (can be enabled/disabled)
- Manual command: /geyserupdate (Permission: geyserupdater.admin)
- Configurable language, messages, targets, intervals, and restart commands
Build
- Prerequisites: Java 17, Maven 3.8+
- Instructions:
- Run
mvn packagein the directory where you cloned the repository - Artifacts:
spigot/target/GeyserUpdater-Spigot-1.0.0.jarbungee/target/GeyserUpdater-Bungee-1.0.0.jarvelocity/target/GeyserUpdater-Velocity-1.0.0.jar
- Run
Installation
- Place the appropriate JAR for your server platform into the plugins folder
- Start the server to generate the
config.ymlfile (it will be identical to the default config included in this README) - The plugin automatically detects existing Geyser / Floodgate JARs by searching for files in the plugins directory that contain "geyser" or "floodgate" in their names
- If no existing JARs are found, it will create new ones with standard names (e.g.,
Geyser-Spigot.jar,floodgate-velocity.jar)
- If no existing JARs are found, it will create new ones with standard names (e.g.,
Commands & Permissions
/geyserupdate- Description: Immediately runs an update check
- Permission:
geyserupdater.admin
Configuration File (config.yml)
enabled: Enables or disables the pluginlanguage: Language setting (ja/en/de/ko, default:ja)checkOnStartup: Enables or disables the update check on startupperiodic.enabled: Enables or disables the periodic update checkperiodic.intervalHours: The interval for periodic checks (in hours)adminLogin.enabled: Enables or disables the update check when a privileged player logs inadminLogin.permission: The permission that triggers the check on login (default:geyserupdater.admin)targets.geyser | targets.floodgate | targets.mcxboxbroadcast: Choose which plugins to updatepostUpdate.notifyConsole: Notifies the console after an updatepostUpdate.notifyPlayersWithPermission: Sends an in-game chat notification to players with permissionpostUpdate.runRestartCommand: Automatically executes a restart command after an updatepostUpdate.restartCommand: The restart command to execute (e.g.,restartorend)messages.<lang>.*: Customize messages (e.g.,messages.ja.*)- For compatibility,
messages.*is also read whenlanguage=ja
- For compatibility,
How it Works
- Download URLs:
- Geyser:
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/{platform} - Floodgate:
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/{platform} - MCXboxBroadcast:
https://api.modrinth.com/v2/project/mcxboxbroadcast/version {platform}isspigot|bungeecord|velocity
- Geyser:
- The latest JAR is downloaded to a temporary file and its SHA-256 hash is compared with the existing JAR
- If the hashes are identical, it is considered "up to date," and the file is not replaced
- If they differ, the existing file is overwritten using an atomic replacement operation
- A server or proxy restart is required after an update is applied
- To enable automatic restarts, set
postUpdate.runRestartCommandtotrueand configurerestartCommandto match your environment
- To enable automatic restarts, set
- MCXboxBroadcast is placed in the Geyser extensions folder
- Example:
plugins/Geyser-Spigot/extensions
- Example:
Notes / Known Limitations
- If a download fails due to network issues or other errors, the existing plugin files will not be affected
- The plugin cannot detect Geyser/Floodgate files if they have unusual names or are not located directly within the plugins folder (it only scans for *.jar files in the root of the plugins directory)
- MCXboxBroadcast is always placed in
plugins/Geyser-Spigot/extensions - The plugin does not display version numbers; it relies solely on hash comparison to determine if an update is available
License
- Apache License 2.0
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Geyser and Floodgate auto uploader
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
错误修复
- 修复了 Paper 26.x 的运行时版本解析问题,包括新的
26.3.build.N-stable版本格式。 - 修复了 ViaVersion 在较新的 Paper 构建版本中无法自动更新的问题(#10)。
- 保持了对之前 Paper 版本格式的兼容性。
- 更新了版本解析测试。
致谢
特别感谢 @Lehrules 贡献此修复方案(#11),并为此次更新的延迟发布致歉!
BungeeCord 分发版:在此平台上,Via 系列插件的自动更新功能已被有意禁用。Geyser/Floodgate 的自动更新仍可使用。
Modrinth 发布版本 1.4 包含 GeyserUpdater 1.2.0(JAR 文件与 GitHub v1.2.0 版本相同)。
为 ViaVersion、ViaBackwards 和 ViaRewind 添加了可单独配置的自动更新功能。请在 config.yml 中添加 targets.viaversion、targets.viabackwards 和 targets.viarewind 配置项;默认值均为 false。
官方 Hangar 兼容性元数据将针对精确的 Paper/Spigot Minecraft 版本或 Velocity 代理版本进行检查。Paper 1.21 和 1.21.1 会被区分对待。仅选择匹配的稳定发布版本。下载哈希值、平台描述符以及 Java 类要求均会经过验证。如果兼容性未知或检查失败,现有 JAR 文件将被保留。跳过降级操作。遇到更高版本的 Java 需求时会停止更新;不会自动搜索适用于旧版 Java 的候选版本。
ViaRewind 需要 ViaVersion 和 ViaBackwards。由于当前官方的 Via JAR 文件需要单独的 Bungee 集成,因此 BungeeCord 会跳过 Via 插件的更新;但 Geyser/Floodgate 的更新仍然可用。
更改配置或应用更新后请重启服务器。命令:/geyserupdate。权限:geyserupdater.admin。
验证情况:Maven 构建成功,并通过 17 项自动化测试。已在隔离目录中检查了实际的 Paper 1.21 Via 分发元数据和 JAR 文件的下载情况、SHA-256 校验、Java 21 类兼容性以及相同文件跳过机制。尚未进行实时服务器启动和玩家连接测试。
源代码及 GitHub 发布页面:
GeyserUpdater 1.3
此版本改进了更新器的可靠性、平台检测以及自动重启处理。
新增
- 新增
postUpdate.restartDelaySeconds- 允许在更新后延迟执行配置的重启命令
- 默认值:
0秒
- 为以下平台添加了延迟自动重启支持:
- Paper / Spigot
- BungeeCord
- Velocity
- 新增了针对平台的 Geyser 和 Floodgate JAR 检测功能
- 新增自动检测机制,防止将 GeyserUpdater 本身误识别为 Geyser JAR
- 新增针对更新器 JAR 检测和重启延迟配置的自动化测试
修复
- 修复了过于宽泛的 Geyser/Floodgate JAR 匹配问题
- 修复了可能选中无关或命名错误的 JAR 文件进行替换的情况
- 修复了 GeyserUpdater 可能被错误检测为其本应更新的插件的问题
- 修复了代理平台上 MCXboxBroadcast 扩展的安装路径问题
- MCXboxBroadcast 现在会安装到正确的特定平台 Geyser 扩展文件夹中
示例:
Paper / Spigot:
plugins/Geyser-Spigot/extensions
BungeeCord:
plugins/Geyser-BungeeCord/extensions
Velocity:
plugins/Geyser-Velocity/extensions
自动重启延迟
你现在可以在执行自动重启命令之前配置延迟时间:
postUpdate:
runRestartCommand: true
restartCommand: "restart"
restartDelaySeconds: 60
对于 BungeeCord,重启命令可以设置为例如 end。
负数的重启延迟值会自动被视为 0。
更改
- 内部版本信息已更新至
1.1.0 - HTTP User-Agent 已更新至
GeyserUpdater/1.1.0 - 改进了扫描插件目录时的资源处理方式
- 更新了英文和日文文档,以反映新的重启延迟和特定平台扩展路径
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
使床在所有维度中爆炸的模组
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
为 Armor Poser 模组添加兼容性
评论 0
登录后参与评分
还没有评论,来抢沙发吧