Use cases
CommandBridge shines in scenarios where you need cross-server communication to execute commands seamlessly. Below are practical scenarios where CommandBridge can be a game-changer.
Example 1: Global /hub
Command with Additional Actions
/hub
Command with Additional ActionsScenario:
You want to implement a global /hub
command that works on any server in your network. When a player types /hub
, they are:
Teleported to the hub server (handled by Velocity).
Once in the hub, a Paper plugin plays background music using the
/music
command.
Problem:
The
/hub
command isnât natively available on Paper servers.The
/music
command can only be executed on the hub server.
Solution with CommandBridge:
CommandBridge lets you define the /hub
command as follows:
The player types
/hub
on any server (Paper or Velocity).CommandBridge triggers the teleport to the hub server using Velocityâs
/server hub
command.Once the player is on the hub server, CommandBridge automatically executes
/music
as the player.
Player runs /hub
CommandBridge receives and processes the command.
Velocity
Teleport to hub
Executes Velocity's /server hub
command to teleport.
Velocity
Play music
Executes /music
for the player after teleporting.
Hub (Paper plugin)
Why Use CommandBridge?
Global availability:
/hub
works from any server in your network.Multi-step execution: Executes commands in sequence, even across servers.
Automation: Automatically triggers the
/music
command without user intervention.
Example 2: Timed Gameplay with Return to Lobby
Scenario: You have a minigame server where players have 15 minutes to play. After their time is up, they must:
Teleport back to the main lobby (handled by Velocity).
A message should appear announcing their return, triggered on the minigame server.
Problem:
Paper doesnât support Velocityâs
/server
commands natively.The minigame server needs to trigger global actions without direct access to Velocity commands.
Solution with CommandBridge:
A Paper plugin on the minigame server triggers a CommandBridge-defined command, e.g.,
/end-session
.CommandBridge teleports the player to the lobby using Velocityâs
/server lobby
.CommandBridge executes a follow-up
/broadcast
command on the minigame server, announcing their departure.
Trigger /end-session
Minigame plugin triggers the CommandBridge command.
Minigame (Paper)
Teleport to lobby
Executes Velocityâs /server lobby
command.
Velocity
Announce return
Broadcasts a farewell message to players.
Minigame (Paper)
Why Use CommandBridge?
Seamless teleportation: Coordinates actions across Velocity and Paper.
Custom workflows: Chains actions like teleporting and messaging.
Example 3: Centralized Rewards with Conditional Actions
Scenario: Youâre running a network-wide event where players can earn rewards. After claiming their reward:
They are teleported to a ârewards roomâ server.
The server gives them a diamond automatically.
An announcement is broadcast only on the rewards server.
Problem:
Bukkit plugins canât trigger Velocityâs
/server
commands directly.Rewards actions need to be automated and localized.
Solution with CommandBridge:
Define a CommandBridge command, e.g.,
/claim-reward
.The command:
Teleports the player to the ârewards roomâ using Velocityâs
/server rewards
.Executes
/give {player} diamond
on the rewards server (Paper).Sends a local announcement using
/say {player} claimed their reward!
.
Player runs /claim-reward
CommandBridge triggers the sequence.
Any server
Teleport to rewards server
Executes /server rewards
.
Velocity
Give diamond
Runs /give {player} diamond
.
Rewards (Paper)
Local announcement
Sends /say {player} claimed their reward!
.
Rewards (Paper)
Why Use CommandBridge?
Cross-server coordination: Automates actions across multiple servers.
Localized commands: Keeps announcements server-specific while managing rewards globally.
When Should You Use CommandBridge?
CommandBridge is ideal if you:
Need global commands that work on every server in your network.
Automate multi-step workflows, such as teleportation and follow-up actions.
Coordinate cross-server actions seamlessly between Velocity and Paper.
Last updated
Was this helpful?