@Override
	
	public void run() {
		try {
			Socket socket = new Socket(localIP ,25565);
			toServer = new ObjectOutputStream(socket.getOutputStream());
			Thread listener = new Thread(new Listener(socket));
			listener.start();
			beginConnection();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}