In order to register a server, you need to connect to redis using the connection details provided in the connection page.
You then need to tell Redis to send a message to the channel: networkcontrol:proxy:register with the relevant information. An example is provided below.
{
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "lobby-1",
"port": 25565,
"server_type": "lobby",
"provider": "LOCAL",
"ip_address": "192.168.1.10"
}This will register the server in NetworkControl and inform BungeeCord to add it to the list of servers accessible to the network.
Every 2 seconds, the server also needs to send a Heartbeat to NetworkControl, with a max timeout of 30 seconds. The channel to do this is `networkcontrol:proxy:heartbeat, and the expected shape example is below:
{
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"server_type": "lobby",
"player_count": 12,
"max_players": 20,
"status": "LOBBY",
"name": "lobby-1",
"opped_uuids": [
"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"
]
}To remove a server from the network, you simply need to send a termination request to the channel networkcontrol:proxy:matchend
With the expected example packet:
{
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}To create a server using a template within NetworkControl, you need to send a packet to the channel networkcontrol:commands:spawn
With the expected example packet:
{
"server_type": "hub",
"count": 2
}