public void run() {
		try {
			Telnet.writeLine(cs, "<fggreen> >>> Welcome to AdaMUD <<< <reset>");
			Telnet.flushInput(cs);
			
			while((player = s.getPlayerDB().login(cs, s)) == null);
			player.look();
			
			while (true) {
				System.out.println("Waiting for message");
				String message = Telnet.readLine(cs).trim();
				
				if(message == null) {
					//Disconnected
					break;
				}
				
				if(message.equals("bye")) {
					Telnet.writeLine(cs, "Goodbye!");
					break;
				}
				
				parseCommand(message);
			}
			
			cs.close();
		}
		catch (IOException e) {
			System.out.println("Client error: " + e);
		}
		finally {
			s.getPlayerDB().remove(player);
			s.remove(cs);
		}
	}