-
Notifications
You must be signed in to change notification settings - Fork 1
URI Scheme
Ling edited this page Jul 22, 2026
·
3 revisions
PCL Nex 注册 pcl:// 和 pclnex://,并关联 .pclx 文件。两个 Scheme 等价。
统一 actions 入口:
pcl://actions?type=<action>&key=value
直接动作入口:
pcl://<action>?key=value
查询和路径参数都会 URL 解码,+ 作为空格。对外生成 URI 时应编码 :, /, \, 空格、&, # 和 ? 等字符。
| 动作 | 别名 |
|---|---|
| 启动游戏 |
launch、launch-game、play
|
| 加入服务器 |
launch-server、join-server、join
|
| 下载原版 |
download-vanilla、download-minecraft、install-vanilla、install-minecraft
|
| 安装整合包 |
install-modpack、download-modpack、modpack
|
| 安装插件 |
install-plugin、plugin-install
|
| 添加插件源 |
add-plugin-source、add-plugin-repo、add-plugin-repository、plugin-source
|
本地 PCLX:
pcl://install-plugin?file=C%3A%5CPlugins%5Cexample.plugin.pclx
远程包:
pcl://install-plugin?package=https%3A%2F%2Fexample.com%2Fexample.plugin.pclx
单插件 Manifest:
pcl://install-plugin?manifest=https%3A%2F%2Fexample.com%2Fmanifest.json
Git 仓库:
pcl://install-plugin?git=https%3A%2F%2Fgithub.com%2Fexample%2Fexample-plugin.git
支持参数:
| 参数 | 说明 |
|---|---|
manifest |
HTTP/HTTPS 单插件 Manifest |
package |
本地或 HTTP/HTTPS .pclx / .zip 包 |
git |
Git 仓库来源 |
file / path
|
本地包路径 |
source / url
|
自动判断包、Manifest 或 Git 来源 |
启动器会先准备和校验来源,再显示包含插件名称和来源的安全确认。用户确认后才安装。
双击 .pclx 文件等价于 install-plugin --file <path>。
JSON 市场来源:
pcl://add-plugin-source?json=https%3A%2F%2Fexample.com%2Fplugin-market.json&name=Example+Market
单插件 Manifest 来源:
pcl://add-plugin-source?manifest=https%3A%2F%2Fexample.com%2Fmanifest.json&name=Example+Plugin
通用 URL 形式:
pcl://add-plugin-source?url=https%3A%2F%2Fexample.com%2Fplugin-market.json&kind=json&name=Example+Market
支持参数:
| 参数 | 说明 |
|---|---|
json |
HTTP/HTTPS 或已有本地 JSON 来源文件 |
manifest |
HTTP/HTTPS 单插件 Manifest |
url / source / repo / repository / index / registry
|
来源地址 |
kind / sourceKind / type
|
json 或 manifest
|
name / title / repoName
|
用户界面显示名称 |
自定义 Topic 不受支持。topic=、topic: 和 topics: 都会被拒绝,因为 pclnexplugin 由客户端内置维护。
官方 NexDeveloper 来源也已经内置,重复添加只会提示无需添加。
Plain Craft Launcher 2.exe "pcl://install-plugin?manifest=https%3A%2F%2Fexample.com%2Fmanifest.json"
内部等价形式:
Plain Craft Launcher 2.exe uri --action install-plugin --file C:\Plugins\example.plugin.pclx
Plain Craft Launcher 2.exe uri --uri "pcl://add-plugin-source?json=https%3A%2F%2Fexample.com%2Fplugin-market.json"
- 所有安装和添加来源动作都应保留用户确认。
- 不要在公共网页中隐藏实际 Manifest 或包来源。
- Manifest 和市场 JSON 仍需使用 HTTPS、SHA-256 和可信开发者判断。
- URI 只是入口,不会绕过插件兼容性、依赖、路径和哈希校验。