AutoUpdatePlugins
下载:
功能与命令
-
/aup显示插件信息/aup reload重新加载配置/aup update手动运行更新/aup log查看完整日志/aup stop停止当前更新
-
使用
update目录进行插件更新 -
基于插件发布页面自动查找下载链接
GitHub, Jenkins, Spigot, Modrinth, Bukkit, Ghost Chop Build Station v2, MineBBS, CurseForge。- 支持从 GitHub 下载预发布版本。
- 支持下载 GitHub Actions 中的文件,通过 实现免登录下载
- 支持在 Modrinth 中指定平台
- 支持在 Modrinth 中指定版本
-
支持匹配同一发布下的不同文件
GitHub, Jenkins, Modrinth。
-
支持文件完整性检查
-
缓存上次更新记录,避免重复下载。
-
不重复安装更新
-
错误重试机制
-
每个更新任务均可单独配置。
-
可配置的证书验证
-
可自定义输出日志级别
-
多语言支持!
-
支持在更新时运行系统命令
运行日志
[INFO]: [AUP] The update check will run after 64 seconds and repeat every 14400 seconds.
[INFO]: [AUP] [## Start running automatic updates ##]
[INFO]: [AUP] [EssentialsX.jar] Updating...
[INFO]: [AUP] [EssentialsX.jar] [Github] Version found: https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1. jar
[INFO]: [AUP] [EssentialsX.jar] Update complete [1.17MB] -> [2.92MB]
[INFO]: [AUP] [EssentialsXChat.jar] Updating...
[INFO]: [AUP] [EssentialsXChat.jar] [Github] Version found: https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsXChat- 2.20.1.jar
[INFO]: [AUP] [EssentialsXChat.jar] Update complete [0.01MB] -> [0.01MB]
[INFO]: [AUP] [CoreProtect.jar] Updating...
[INFO]: [AUP] [CoreProtect.jar] [Modrinth] Version found: https://cdn.modrinth.com/data/Lu3KuzdV/versions/w3P6ufP1/CoreProtect-22.2.jar
[INFO]: [AUP] [CoreProtect.jar] file is up to date!
...
[INFO]: [AUP] [## Update all done ##]
[INFO]: [AUP] - Time consumed: 268 seconds
[INFO]: [AUP] - Failed: 2, Updated: 22, Completed: 24
[INFO]: [AUP] - Network requests: 48, Downloaded files: 40.10MB
配置
# How long to wait for the first update to run after the server has finished booting (seconds)
startupDelay: 64
# After the first run is complete, repeat the update at this frequency (seconds, reboot required after modification).
startupCycle: 14400 # 4h
# Plugin update directory, set as in bukkit.yml
# Note that the path must end with "/"
updatePath: './plugins/update/'
# Download the cache directory without modification
# New .jar files will be downloaded to the cache directory first, then moved to the plugin update directory after validation is complete
tempPath: './plugins/AutoUpdatePlugins/temp/'
# Directory of plugins or files the server is running, for hash checking
filePath: './plugins/'
# Enable the last update record and check for updates with this information (temp.yml)
enablePreviousUpdate: true
# File integrity check, only works on .jar / .zip files. Try to open it as a zip file, if it fails, it is incomplete.
zipFileCheck: true
# If the file configuration matches this regex, zip integrity checking is enabled, otherwise it is not enabled
zipFileCheckList: '\.(?:jar|zip)$'
# Do not move to the update directory if the hash of the downloaded file matches the hash of the file to be updated in the update directory (or the file running on the server) (MD5)
ignoreDuplicates: true
# Whether to enable SSL authentication, usually do not turn it off
sslVerify: true
# Failed network request retry count
fetchErrRetry: 4
# Initial retry delay, +2 seconds per retry
fetchErrRetryDelay: 5
# Setting up a web proxy
proxy:
type: DIRECT # DIRECT | HTTP | SOCKS
host: '127.0.0.1'
port: 7890
# Control proxy usage for different requests
reqApi: true
reqDownload: true
# Edit request headers in HTTP requests
setRequestProperty:
- name: 'User-Agent'
value: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36'
# 启用哪些日志等级
logLevel:
- 'DEBUG' # for debugging, can be commented out after testing is complete
- 'MARK' # Same as DEBUG, green color, used to mark task completion.
- 'INFO' # Output logs
- 'WARN' # Output warnings
- 'NET_WARN' # Warnings from the web request module
# Plugin List
# The URL supports automatic download of plugins from `GitHub, Jenkins, SpigotMC, Modrinth, Bukkit, 鬼斩构建站 v2, MineBBS, CurseForge` pages, while other links will download them directly.
# One of the `GitHub, Jenkins, Modrinth` pages can use the get parameter to download a specific file.
# GitHub links can be configured with `getPreRelease: true` to download the latest pre-release version.
list:
- file: 'AutoUpdatePlugins自动更新.jar'
url: https://modrinth.com/plugin/autoupdateplugins
### Example configurations ### Note Yaml formatting during testing
# - file: 'EssentialsX.jar' # Github
# url: https://github.com/EssentialsX/Essentials
# get: 'EssentialsX-.*\.jar' # If there is more than one file in the GitHub/Jenkins distribution, you need to match one of them, otherwise download the first one (using the regular expression
# - file: 'EssentialsXChat.jar' # 匹配同一版本中的不同文件
# url: https://github.com/EssentialsX/Essentials
# get: 'EssentialsXChat-.*\.jar'
# - file: 'TrPlugins.jar' # 从 GitHub Actions 下载文件
# url: https://github.com/TrPlugins/TrChat/actions
# get: 'TrChat Artifacts' # 匹配运行时生成的工件名称
# zipGet: 'TrChat-[\.\d]+\.jar' # 解压:匹配压缩包内的文件
# - file: 'Chat2QQ.jar'
# url: https://github.com/ApliNi/Chat2QQ/actions
# get: 'Chat2QQ\.jar'
# zipGet: 'Chat2QQ\.jar'
# - file: 'test.jar'
# url: https://www.spigotmc.org/resources/invsee.82342/
# zipGet: 'InvSee\+\+\.jar' # 解压文件
# - file: 'Geyser-Spigot.jar' # URL
# url: https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
# - file: 'ViaVersion-DEV.jar' # Jenkins
# url: https://ci.viaversion.com/job/ViaVersion-DEV/
# - file: 'ViaBackwards-DEV.jar'
# url: https://ci.viaversion.com/view/ViaBackwards/job/ViaBackwards-DEV/
# - file: 'CoreProtect.jar' # Modrinth
# url: https://modrinth.com/plugin/coreprotect/
# - file: 'simple-voice-chat.jar'
# url: https://modrinth.com/plugin/simple-voice-chat
# loader: paper # 指定平台
# version: ServerVersion # 指定版本,'1.21.10' / ServerVersion
# - file: 'UseTranslatedNames.jar'
# url: https://modrinth.com/plugin/usetranslatednames
# - file: 'HttpRequests.jar' # SpigotMC
# url: https://www.spigotmc.org/resources/http-requests.101253/
# - file: 'Chunky.jar' # MineBBS
# url: https://www.minebbs.com/resources/chunky-tps.7318/
# - file: 'SF4_Slimefun4.jar' # 鬼斩构建站 v2
# url: https://builds.guizhanss.com/StarWishsama/Slimefun4/master
# - file: 'SF4_FluffyMachines.jar'
# url: https://builds.guizhanss.com/SlimefunGuguProject/FluffyMachines/master
# - file: 'Dynmap.jar'
# url: https://legacy.curseforge.com/minecraft/bukkit-plugins/dynmap
# # 可以像这样为每个文件添加配置
# # 如果文件配置包含路径,则 path 参数会自动设置。
# - file: './serverConfig.yml'
# url: 'http://[::]:5212/serverConfig.yml'
### 列表中的所有可用配置 ###
# 除非你知道自己在做什么,否则不要随意使用。
# String file; // 文件名
# String url; // 下载链接
# String tempPath; // 下载缓存路径,默认使用全局配置
# String updatePath; // 更新路径,默认使用全局配置
# String filePath; // 最终安装路径,默认使用全局配置。
# String path; // 同时覆盖 updatePath 和 filePath 配置
# String get; // 用于选择指定文件的正则表达式,默认选择第一个。仅适用于 GitHub、Jenkins、Modrinth。
# String zipGet; // 如果需要解压文件,使用此参数指定正则表达式。
# String loader; // 匹配平台标签,仅适用于 Modrinth
# String version; // 匹配插件版本,仅适用于 Modrinth,填写 "ServerVersion" 以自动选择服务器版本
# String c_version_type; // 版本类型(发布渠道),例如 beta、release,仅适用于 Modrinth
# boolean getPreRelease; // 允许下载预发布版本,默认为 false。仅适用于 GitHub。
# boolean zipFileCheck; // 启用 ZIP 文件完整性检查
# boolean ignoreDuplicates; // 关闭哈希检查
# 在此处编辑插件可能显示的消息
message:
updateCheckIntervalTooLow: '#### 更新检查间隔过低会导致性能问题!###'
timer: '更新检查将在 %1 秒后运行,并以 %2 秒的间隔重复'
commandReloadOnUpdating: '当前正在运行更新,配置重载将推迟'
commandReloadOK: '重载完成'
commandRepeatedRunUpdate: '已有一个未完成的更新正在运行'
commandUpdateStart: '更新正在运行!'
commandFullLog: '完整日志:'
commandStopUpdateIng: '当前更新正在停止...'
stopUpdate: '请求过多'
repeatedRunUpdate: '### 更新程序是否重复启动或出错?###'
updateStart: '[### 开始运行自动更新 ##]'
configErrList: '更新列表配置错误? '
configErrUpdate: '更新列表配置错误?项目为空。'
configErrMissing: '更新列表配置错误?缺少基本配置'
updateChecking: '正在检查更新...'
updateErrParsingDUrl: '解析直链时出错,将跳过此更新'
updateTempAlreadyLatest: '[缓存中] 文件已是最新版本'
updateErrDownload: '下载文件时出错,将跳过此更新'
updateZipFileCheck: '[ZIP 完整性检查] 文件不完整,将跳过此更新'
updateFileAlreadyLatest: '文件已是最新版本'
updateFulSizeDifference: '更新完成 [%1MB] -> [%2MB]'
updateFul: '[## 全部更新完成 ##]'
updateFulTime: '耗时:%1 秒'
updateFulFail: '失败:%1,'
updateFulUpdate: '已更新:%1,'
updateFulOK: '成功:%1'
updateFulNetRequest: '网络请求:%1, '
updateFulDownloadFile: '正在下载文件:%1MB'
logReloadOK: '重载完成'
debugGetVersion: '找到版本:%1'
debugNoFileMatching: '无匹配的文件:%1'
debugNoRepositoryPath: '未找到仓库路径:%1'
debugErrUrlResolveNoID: 'URL 解析错误,是否未包含插件 ID?'
debugErrUrlResolveNoName: 'URL 解析错误,未找到项目名称:%1'
debugErrNoID: '未找到项目 ID:%1'
urlInvalid: 'URL 无效或不规范:%1'
networkErrorRetry: '网络错误,请等待 %1 秒...'
zipDecompressionFailed: 'ZIP 解压失败'
部分功能和代码参考自项目 NewAmazingPVP/AutoUpdatePlugins。
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包事件PacketEvents
retrooper
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
前置科技
28
ExyliaLib
ExyliaServices
ExyliaPlugins 的库。
前置实用
26
ProAuthMeLogin
3623813757
通过对话框或铁砧界面帮助你的 Anthme
实用
16
Vessel
muhdfdeen
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
生物存储
13
Vivecraft Spigot Extension
fayer3
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
前置实用
12
旅行地图
mysticdrew
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
冒险实用
12
评论 0
登录后参与评分
还没有评论,来抢沙发吧