forked from SteamWar/SteamWar
Fix DevCommand not working when version switching without trying to connect in between when no server is running
This commit is contained in:
@@ -135,12 +135,12 @@ public class DevCommand extends SWCommand {
|
||||
});
|
||||
|
||||
devServerPorts.forEach((username, value) -> {
|
||||
if (devServers.containsKey(username))
|
||||
return;
|
||||
|
||||
SteamwarUser user = SteamwarUser.get(username);
|
||||
String name = "Dev " + user.getUserName();
|
||||
((VelocityViaConfig) Via.getConfig()).getVelocityServerProtocols().put(name, ServerVersion.get(devServerVersions.get(username)).getProtocolVersion().getProtocol());
|
||||
|
||||
if (devServers.containsKey(username))
|
||||
return;
|
||||
devServers.put(user.getUserName().toLowerCase(), VelocityCore.getProxy().registerServer(new ServerInfo(name, new InetSocketAddress("127.0.0.1", value))));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user