feat: improved Server mainclass

This commit is contained in:
Yannik Bretschneider 2021-06-06 03:48:40 +02:00
parent bbaeb63bb6
commit 8b2805fcf1

View File

@ -12,6 +12,7 @@ import uulm.teamname.marvelous.gamelibrary.json.JSON;
import uulm.teamname.marvelous.gamelibrary.json.ValidationUtility; import uulm.teamname.marvelous.gamelibrary.json.ValidationUtility;
import uulm.teamname.marvelous.server.args.ServerArgs; import uulm.teamname.marvelous.server.args.ServerArgs;
import uulm.teamname.marvelous.server.netconnector.MarvelousServer; import uulm.teamname.marvelous.server.netconnector.MarvelousServer;
import uulm.teamname.marvelous.server.netconnector.UserManager;
import java.io.*; import java.io.*;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
@ -74,12 +75,13 @@ public class Server {
InetSocketAddress address = new InetSocketAddress(serverArgs.getPort()); InetSocketAddress address = new InetSocketAddress(serverArgs.getPort());
Logger.trace("Inet address {} created", address); Logger.trace("Inet address {} created", address);
Logger.trace("Instantiating MarvelousServer...");
MarvelousServer netConnector = new MarvelousServer(address); MarvelousServer netConnector = new MarvelousServer(address);
System.out.println("Starting server");
Logger.trace("Starting MarvelousServer...");
netConnector.start(); netConnector.start();
System.out.println("Server started");
Logger.trace("End of Main reached. Exiting main thread.");
} }
/** Function that sets the log level for {@link Logger Tinylog}. /** Function that sets the log level for {@link Logger Tinylog}.