private void useData(String line)
	{
		
		int data[] = convertData(line);
		
		if(data[0] == 1 && !logedin)
		{
			login(data);
		}
		
		if(data[0] == 2)
		{
			//gets the best scores.
			List<MysqlPlayerScore> scores = getBestScore(data[1],true);
			
			//formats a message to send.
			String message = "/pBestS;";
			if(scores == null) // the scores could be null and that should be checked!
				message += "0;";
			else
			{
				message += scores.size()+";";
				
				//adds the scores to the message
				for(int i = 0;i<scores.size();i++)
					message += scores.get(i).getScore()+";";
			}
	
			//sends the one message with all the data.
			sendMessage(message);
		}
		
		if(data[0] == 3)
		{
			//gets the best scores.
			List<MysqlPlayerScore> scores = getBestScore(data[1],false);
			
			//formats a message to send.
			String message = "/gBestS;";
			
			if(scores == null) // the scores could be null and that should be checked!
				message += "0;";
			else
			{
				message += scores.size()+";";
				
				//adds the scores to the message
				for(int i = 0;i<scores.size();i++)
					message += scores.get(i).getScore()+";";
			}
		
			//sends the one message with all the data.
			sendMessage(message);
		}
		
		if(data[0] == 4)
		{
			addScore(data[1]);
			notifyScoreChange();
		}
		
		/*if(data[0] == 5) cia veliau kai bus onlinas arba rank sistema globali.
		{
			//uzdeda nauja nika is line pasiemes ji
			savePlayerToMysql();
		}*/
	}