This commit is contained in:
Anuken
2019-02-17 01:36:46 -05:00
parent 86dddd0253
commit 5e2a455045
11 changed files with 29 additions and 108 deletions

View File

@@ -29,6 +29,7 @@ import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.ItemType;
import java.io.IOException;
import java.net.BindException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;
@@ -671,6 +672,8 @@ public class ServerControl implements ApplicationListener{
try{
Net.host(Core.settings.getInt("port"));
info("&lcOpened a server on port {0}.", Core.settings.getInt("port"));
}catch(BindException e){
Log.err("Unable to host: Port already in use! Make sure no other servers are running on the same port in your network.");
}catch(IOException e){
err(e);
state.set(State.menu);