public static void main(String[] args) throws Exception {
		if(args.length < 1) {
			System.err.println("ERROR: USAGE SHOULD BE; <port> <max-players>");
			System.err.println("Starting with default settings <5555> <2000> where 5555 is port & 2000 is max-players");
			args = new String[] { "5555", "2000" };
		}
		for(String arg : args) {
			if(arg.contains("-nogui")) {
				guiMode = Boolean.FALSE;
				break;
			}
		}
		if(guiMode) {
			logger.info("Building GUI...");
			ServerWindow.getSingleton().init();
			PluginFactory.getSingleton().init();
		}
		logger.info("Starting server...");
		World.getSingleton();
		FileStore.getSingleton();
		LoginService.getSingleton().init();
		LogicService.getSingleton().init();
		PacketManager.getSingleton().init();
		OnDemandService.getSingleton().init();
		JavaScriptEngine.getSingleton().init();
		DatabaseManager.getSingleton().addDatabase(DatabaseConnection.create("127.0.0.1", "lolserver", "lollol", "server"), "info");
		DatabaseManager.getSingleton().addDatabase(DatabaseConnection.create("127.0.0.1", "lolserver", "lollol", "server"), "player-loader");
		ItemDefinitionsManager.getSingleton().init();
		Equipment.init();
		MapDataManager.getSingleton().init();
		World.getSingleton().loadNPCs();
		DatabaseManager.getSingleton().kill("info");
		Server.createServer(Integer.parseInt(args[0]), Integer.parseInt(args[1]));
		Server.getSingleton().init();
		logger.info("Server online on port "+Server.getSingleton().getPort()+"!");
	}