Proxies & Transfers
Fileconfig.jsonBots and swarms join a Velocity or BungeeCord/Waterfall proxy like any server: host and port point at the proxy. With Velocity modern forwarding or BungeeCord forwarding the backends see the bot's name and UUID, and the bot needs nothing extra.
curl "localhost:8767/join?name=NetBot&host=127.0.0.1&port=25577"
curl "localhost:8767/server?bot=NetBot&to=survival"
curl "localhost:8767/server?bot=NetBot&probe=1"Server switches
/server lobby, a plugin that sends Connect on the BungeeCord channel and a proxy /send all look the same to the bot: the proxy moves it into configuration and logs it in on the new backend. The bot drops its window, dialog, entities, world copy, effects and movement state, and counts the switch.
Transfers
The 1.20.5+ transfer packet is followed to the new host and port, with the transfer intent in the handshake, through Via when the target runs another version.
Cookies the server stored are kept across the transfer and sent back when a server asks. A fresh join starts without them. The auto-reconnect target stays the server the bot first joined.
Which backend a bot is on
/stats and the server action report where the bot is:
| Field | Comes from |
|---|---|
server | In this order: a /server name the bot sent right before a switch, the proxy's reply to /server (probe=1), or a server: name line in the tab list header or footer |
proxy | velocity, bungeecord or waterfall, from the server brand |
brand | The server brand itself |
switches | Switches and transfers so far |
address | Where the bot is connected now |
Joining a backend straight
A Paper backend set up for Velocity modern forwarding refuses players that do not come through the proxy. With the proxy's forwarding secret, a bot joins such a backend straight, without the proxy and without a premium account.
Copy the secret
Config keyforwarding.secretTake the contents of Velocity's
forwarding.secret.Paste it into Settings
Fileconfig.jsonSettings > Bots > Velocity forwarding secret (
velocityForwardingSecretinconfig.json). Empty turns it off.Join the backend's port
Point the bot at the backend, not the proxy. When the backend asks for the player on
velocity:player_info, the bot answers like Velocity would: its name and UUID, signed with the secret.
- Only offline bots answer this way, a premium bot logs in as itself.
- The UUID is the bot's offline UUID, or the UUID of a saved account with the same name, so a bot keeps the player data that account has on the server.
- A takeover client joins through the takeover proxy, which answers the same question for it, so a taken over bot gets onto the same backend.
Versions
The status ping asks for 1.21.11, so a proxy answers with that protocol and the bot talks 1.21.11 to it. If the backends run another version without ViaVersion, pass version= with the backend's version.
In a scenario
- do: action
action: server
to: survival
- do: expectServer
name: surv.* # regex on the backend name
probe: true # ask the proxy with /server, optional
timeout: 10000