Closed misiek08 closed 8 years ago
Add the server in config.yml the do /greload..
I saw in many places that /greload can cause bugs, unstability and other bad things. Are you sure is good way to do it?
@misiek08 Don't do greload. @LaxWasHere is misinformed.
So what's the best way (if there is any way)?
I thought about writing such proxy by myself it I can't do such things with BC. I stick with it until now, because it's ready solution, but performance and resources usage it's bad from my point of view and features set it's like 70% of what proxy should contain :)
I'll give you a hint: ProxyServer.getServers() is mutable.
You can figure out how to do the rest, if you can develop a plugin.
Just adding servers to Configuration.servers will make them accessible after few seconds?
No, you have to write a custom BungeeCord Plugin. The right way to add a Server in a Plugin is the following:
public void addServerToBungee(String name, String adress, String motd, Boolean restricted)
{
getProxy().getInstance().getServers().put(name, getProxy().getInstance().constructServerInfo(name, net.md_5.bungee.Util.getAddr(adress), motd, restricted));
}
Now you can just call the method "addServerToBungee()" to add a new Server. I didn't test it, but it should work.
Is it possible to add to BungeeCord Plugin API and/or command to allow administrators change server config live? For example I have at average 1000-1500 players and restarting bungeecord to add few lobby servers for minigames is painful.