use of net.minecraft.client.network.ServerPinger in project MinecraftForge by MinecraftForge.
the class FMLClientHandler method connectToServerAtStartup.
public void connectToServerAtStartup(String host, int port) {
setupServerList();
ServerPinger osp = new ServerPinger();
ServerData serverData = new ServerData("Command Line", host + ":" + port, false);
try {
osp.ping(serverData);
startupConnectionData.await(30, TimeUnit.SECONDS);
} catch (Exception e) {
showGuiScreen(new GuiConnecting(new GuiMainMenu(), client, host, port));
return;
}
connectToServer(new GuiMainMenu(), serverData);
}
Aggregations