CommandBridge 是一款面向运行在 Velocity 上的 Minecraft 网络的跨服务器命令执行插件。你可以通过浏览器 GUI 设置网络并构建命令,也可以直接在代理端编写 YAML 脚本。CB 会通过 WebSocket 或 Redis 在这些已连接的服务器之间注册和分发这些命令。
玩家在后台服务器运行 /lobby,代理端会捕获该指令。管理员在 Velocity 上运行 /alert,选定的后台服务器便会执行它。命令传递不依赖玩家在线即可发送插件消息。
在浏览器中设置你的网络
在 Velocity 上运行 /cb setup 并打开它提供的链接。全新安装时,CB 会自动在控制台中打印出设置链接。
页面将引导你为代理命名、选择 WebSocket 或 Redis、配置连接以及添加后台服务器。审查设置后,在代理控制台中运行确认命令以应用更改。
每个后台服务器都会获得一个配对命令。将其复制到该服务器的控制台中,查看显示的代理地址,然后运行 /cbc pair confirm。CB 会自动写入连接设置,包括共享密钥和 TOFU(Trust On First Use)连接的证书指纹。
可视化构建命令
在 Velocity 上运行 /cb editor 并打开链接。你现有的脚本将加载到可视化编辑器中,你可以在画布上连接命令、参数、服务器目标和执行步骤。
选择命令的注册位置、执行它的服务器,以及它是作为控制台、玩家还是操作员运行。通过编辑器添加权限、延迟和冷却时间。你也可以打开 YAML 面板直接编辑脚本。
满意更改后,点击保存。CB 会检查脚本并提供一个 /cb editor confirm <code> 命令。在代理端运行它以写入文件并重新加载脚本。
设置和编辑器流量采用端到端加密。请保持链接私密,并在确认前审查更改。
工作原理
所有内容仍通过存储在 Velocity 上的 YAML 脚本运行。可视化编辑器读取并写入相同的文件,因此你可以在浏览器和手动编辑之间切换。
每个脚本定义命令名称、参数、注册位置以及有人运行时的行为。CB 会在注册前验证脚本。如果某个脚本无效,它会报告问题并跳过该脚本,同时加载其他脚本。
以下是一个禁用的 /example <player> <message> 示例脚本。启用后,它将在名为 client-1 的 Velocity 实例上注册,并在 survival-1 上以控制台身份运行 msg。请将这些 ID 替换为你自己的:
version: 4
name: example
description: An example command script - edit or replace this with your own
enabled: false
aliases: [ex]
permissions:
enabled: true
silent: false
register:
- id: "client-1"
location: VELOCITY
defaults:
run-as: CONSOLE
execute:
- id: "survival-1"
location: BACKEND
server:
target-required: false
schedule-online: false
player-arg: ""
delay: 0s
cooldown: 0s
args:
- name: player
required: true
type: STRING
suggestions: []
- name: message
required: true
type: TEXT
suggestions: []
commands:
- command: "msg ${player} ${message}"
平台
一个 jar 包适用于 Velocity 和支持的后台服务器。在每个服务器上安装相同的文件。
传输协议
WebSocket 是默认选项。如果你已经在使用 Redis 或者它更适合你的网络布局,请选择 Redis。
WebSocket 模式:Velocity 托管桥接服务器,你的后台服务器连接到它。TLS 内置其中,你不需要单独的消息服务。
Redis 模式:所有实例都连接到你的 Redis 服务器。消息经过签名以检测篡改和重放攻击。签名并不加密其内容,因此请限制对 Redis 的访问,并在需要时使用受保护的网络或加密隧道。
两种模式均支持多代理设置。一个 Velocity 作为主节点,额外的代理以客户端模式连接。
安全性
代理与后台连接使用相互 HMAC-SHA256 认证。双方证明知道共享密钥,而无需在网络上传输它。
WebSocket 连接支持 TOFU、STRICT 和 PLAIN 模式。TOFU 是默认模式。Velocity 在首次启动时生成自签名证书,后台服务器会检查其公钥指纹。通过浏览器辅助配对可将代理的指纹保存到后台配置中。PLAIN 模式禁用 TLS 加密。
浏览器编辑器、设置和配对功能均采用端到端加密。配置更改和编辑器保存需要在代理端确认,后台配对则需要在该后台的控制台中确认。
执行模式
根据你的需求,命令可以在三种上下文中运行。
CONSOLE 以目标服务器的控制台身份运行。PLAYER 以触发脚本的玩家身份运行。OPERATOR 以拥有命令临时权限授予的玩家身份运行。基于玩家的执行要求该玩家在线于目标服务器上。
参数
参数解析和 Tab 补全使用 CommandAPI。类型涵盖基本字符串和数字,以及 Minecraft 特定值,如玩家、位置、物品和实体。可用类型取决于平台和已安装的可选插件。
参数在命令字符串中变为 ${name} 占位符。如果需要外部数据(如玩家统计或经济数值),也支持 PlaceholderAPI。
管理网络
设置每个玩家的冷却时间,并对单个命令应用延迟。一个脚本可以运行多个命令,每个命令都有其各自的目标和设置。
对于需要在特定服务器上有玩家的命令,启用 schedule-online 可将执行排队,直到玩家到达该服务器为止。待处理的计划任务在重启后仍然保留。
使用 /cb reload 重新加载脚本而无需重启 Velocity,或通过浏览器编辑器保存并确认更改。CB 跟踪跨连接服务器的玩家存在状态(包括客户端模式代理),以解析玩家目标和计划执行。
依赖项
每台服务器上都必需 CommandAPI。PlaceholderAPI(通过 PapiProxyBridge)和 PacketEvents 为可选。
如果使用 Redis,在升级到 3.3.7 时,需同时更新并重启所有连接的代理和后端服务器。此版本会拒绝旧版的未签名消息。
指标数据
本插件通过 bStats 收集匿名统计数据。您可以在 plugins/bStats/config.yml 中禁用此功能。
CommandBridge is a cross-server command execution plugin for Minecraft networks running on Velocity. Set up your network and build commands through a browser GUI, or write YAML scripts directly on the proxy. CB registers and dispatches those commands across your connected servers over WebSocket or Redis.
A player runs /lobby on a backend, the proxy picks it up. An admin runs /alert on Velocity, your selected backends execute it. Command delivery does not depend on a player being online to carry plugin messages.
Set up your network in the browser
Run /cb setup on Velocity and open the link it gives you. On a fresh install, CB prints a setup link in the console automatically.
The page walks you through naming your proxy, choosing WebSocket or Redis, configuring the connection, and adding your backend servers. Review the settings, then run the confirmation command in your proxy console to apply them.
Each backend gets a pairing command. Copy it into that server's console, check the proxy address it shows, and run /cbc pair confirm. CB writes the connection settings for you, including the shared secret and the certificate pin for a TOFU connection.
Build commands visually
Run /cb editor on Velocity and open the link. Your existing scripts load into a visual editor where you can connect commands, arguments, server targets, and execution steps on a canvas.
Choose where a command registers, which servers execute it, and whether it runs as console, player, or operator. Add permissions, delays, and cooldowns through the editor. You can also open the YAML panel and edit the script directly.
When you're happy with the changes, click Save. CB checks the scripts and gives you a /cb editor confirm <code> command. Run it on the proxy to write the files and reload the scripts.
Setup and editor traffic is end-to-end encrypted. Keep the links private, and review changes before confirming them.
How it works
Everything still runs through YAML scripts stored on Velocity. The visual editor reads and writes those same files, so you can switch between the browser and editing them by hand.
Each script defines the command name, arguments, where it registers, and what happens when someone runs it. CB validates scripts before registering them. If one is invalid, it reports the problem and skips that script while loading the others.
Here is a disabled example script for /example <player> <message>. Once enabled, it registers on the Velocity instance named client-1 and runs msg as console on survival-1. Replace those IDs with your own:
version: 4
name: example
description: An example command script - edit or replace this with your own
enabled: false
aliases: [ex]
permissions:
enabled: true
silent: false
register:
- id: "client-1"
location: VELOCITY
defaults:
run-as: CONSOLE
execute:
- id: "survival-1"
location: BACKEND
server:
target-required: false
schedule-online: false
player-arg: ""
delay: 0s
cooldown: 0s
args:
- name: player
required: true
type: STRING
suggestions: []
- name: message
required: true
type: TEXT
suggestions: []
commands:
- command: "msg ${player} ${message}"
Platforms
One jar works on Velocity and the supported backends. Install the same file on each server.
Transport
WebSocket is the default. Choose Redis if you already run it or it suits your network layout better.
WebSocket mode: Velocity hosts the bridge server, and your backends connect to it. TLS is built in, and you do not need a separate messaging service.
Redis mode: all instances connect to your Redis server. Messages are signed to detect tampering and replay attempts. Signing does not encrypt their contents, so keep Redis access restricted and use a protected network or encrypted tunnel where needed.
Both modes support multi-proxy setups. One Velocity runs as the primary, and additional proxies connect in client mode.
Security
Proxy and backend connections use mutual HMAC-SHA256 authentication. Both sides prove they know the shared secret without sending it over the wire.
WebSocket connections support TOFU, STRICT, and PLAIN modes. TOFU is the default. Velocity generates a self-signed certificate on first startup, and backends check its public-key fingerprint. Browser-assisted pairing saves the proxy's pin in the backend configuration. PLAIN disables TLS encryption.
The browser editor, setup, and pairing use end-to-end encryption. Configuration changes and editor saves require confirmation on the proxy, and backend pairing requires confirmation in that backend's console.
Execution modes
Commands can run in three contexts depending on what you need.
CONSOLE runs as the destination server's console. PLAYER runs as the player who triggered the script. OPERATOR runs as a player with temporary permission grants for the command. Player-based execution requires that player to be online on the destination server.
Arguments
Argument parsing and tab completion use CommandAPI. Types cover basic strings and numbers as well as Minecraft-specific values such as players, locations, items, and entities. Available types depend on the platform and installed optional plugins.
Arguments become ${name} placeholders in your command strings. PlaceholderAPI is supported too if you need external data like player stats or economy values.
Managing your network
Set per-player cooldowns and apply delays to individual commands. A script can run several commands, each with its own targets and settings.
For commands that need a player on a particular server, enable schedule-online to queue execution until the player arrives there. Pending scheduled tasks persist across restarts.
Reload scripts without restarting Velocity using /cb reload, or save and confirm changes through the browser editor. CB tracks player presence across connected servers, including client-mode proxies, to resolve player targets and scheduled execution.
Requirements
CommandAPI is required on every server. PlaceholderAPI via PapiProxyBridge and PacketEvents are optional.
If you use Redis, update and restart every connected proxy and backend together when upgrading to 3.3.7. Older unsigned messages are rejected by this version.
Metrics
This plugin collects anonymous statistics via bStats. You can disable this in plugins/bStats/config.yml.
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CommandBridge
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
CommandBridge 3.3.7
新增功能
- 通过
/cb editor提供实时 Web 脚本编辑器,在保存并重新加载脚本前,需通过/cb editor confirm <code>审查和确认更改。 - 通过
/cb setup提供引导式网络设置,在应用配置更改前需控制台确认。 - 设置向导会将实际代理和后端 ID 填充到未修改的示例脚本中。
- 通过
/cbc pair进行后端配对,包括连接设置保存前的目标预览和控制台确认。 - 在代理服务器的服务器列表中显示后端平台信息。
安全性与可靠性
- 浏览器编辑器、设置及配对消息的端到端加密。
- 带通道绑定、过期时间和重放检查的签名 Redis 消息。
- 对传入连接实施身份验证门控,并对桥接和中继消息设置大小限制。
- 修复了重连/身份验证竞态条件、过期的命令注册、远程玩家权限以及调度验证问题。
- 更安全的脚本/配置及定时任务持久化机制,保留无法读取的任务数据而非覆盖它。
- 修复了超大时间参数、可选数值参数、插件消息队列及诊断信息脱敏问题。
- 空命令同步不再发出警告或报告注册失败;部分注册会被报告为失败。
升级说明
- Redis 网络:请同时更新并重启所有已连接的代理和后端。 旧版未签名的 Redis 消息将被此版本拒绝。请确保系统时钟相互误差不超过两分钟。
- 更新前请备份配置文件和脚本。保持编辑器/设置链接和配对代码私密,并在确认后端配对前验证目标地址。
此次小幅更新仅修复了一些 bug 以及 Arclight 的冲突问题。
最新提交:d6a59a9
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧