@SuppressWarnings("static-access")
	public void scanForIPs() {
		Thread t = new Thread() {
			public void run() {
				status.setText("Scanning network for reachable servers");
				repaint();
				String IPV4 = "";
				try {
					String currentIP = getLocalAddress().toString().replaceFirst("/", "");
					String[] parts = currentIP.split("\\.");
					for (int i = 0; i < parts.length; i++) {
						if (i != parts.length - 1) IPV4 += parts[i] + ".";
					}
				} catch (SocketException e) {
					System.err.println(" LOBBY] [ERROR]" + e);
				}
				System.out.println(" LOBBY] [SCAN] Started");
				for (int i = 0; i < 256; i++) {
					scanning = true;
					final String tryIp = IPV4 + i;
					SwingUtilities.invokeLater(new Runnable() {
						public void run() {
							status2.setText(ip = tryIp);
							status2.repaint();
						}
					});
					try {
						new Thread().sleep(100);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
					serverReset();
					server();
					try {
						new Thread().sleep(100);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
					if (game.socketClient.isConnected()) break;
				}
				scanning = false;
				try {
					ip = getLocalAddress().toString();
				} catch (SocketException e) {
					System.err.println(" LOBBY] [ERROR]" + e);
				}
			}
		};
		t.start();

	}