@Override
	public void run() {
		super.run();
		try{
			recieveData: while(running){
				if(!fromServer.ready()){
					sleep(100);
					continue;
				}
				String line = fromServer.readLine();
				if(line.isEmpty()){
					continue recieveData;
				}
				parent.updateJustPinged();
				String[] lines = line.split("\\s+");
				try{
					parseCommand(lines);
					parseServerStatus(lines);
				}catch(ArrayIndexOutOfBoundsException e){
				}catch(NullPointerException e){
				}
			}
			parent.close(ServerState.DROPPED);
		}catch(IllegalStateException e){
			System.out.println("Closing connection input.");
		} catch (IOException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
		}
		try {
			toServer.close();
			fromServer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println("closed reciever");
	}