Closed s5bug closed 4 years ago
BungeeCord API allows adding servers by constructing a server info with ProxyServer.getInstance().constructServerInfo(...)
and then calling ProxyServer.getInstance().getServers().add(...)
Removal should be possible too, but make sure nobody is on the servers you remove.
Awesome, thank you!
SubServers works a little differently in this regard since the simulated method ProxyServer.getServers()
returns a compiled map of all Servers and Subservers (or "legacy" ServerInfo in some instances). As such modifying the resulting map currently does nothing, which is a bit of an oversight on my part where compatibility is concerned, so this will probably be fixed later.
Either way, adding servers dynamically here is typically done from SubAPI.addServer()
or Host.addSubServer()
for adding Servers and Subservers respectively. Alternatively, there's SubCreator.create()
for creating Subservers using SubCreator.
Say I'm using the Enterprise method in the wiki. SubAPI adds Hosts, and each host adds one SubServer, right?
A host doesn't technically add anything on its own (besides itself, i suppose). You would then assign Subservers to the host that they exist on.
See: https://github.com/PaperMC/Waterfall/issues/466
I think, based on what I've seen of it, I want to use SubServers.