public void run() {
    		try {
	    		out = new PrintWriter(socket.getOutputStream(), true);                   
	            in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
	            String client_input;
	            
	            // Read input from client and execute on commands
	            while ((client_input = in.readLine()) != null) {
	            	if (client_input.equalsIgnoreCase("JOIN")) {
	                	if (players.contains(player_name)) {
	                		out.println("You are already on the list!");
	                	} else {
	                		System.out.println("New player: "+ player_name +" ("+ socket.getLocalAddress() +") has joined the list of players.");
		                	players.add(player_name);
		                	out.println("Successfully joined list of players.");
	                	}
	                } else if (client_input.equalsIgnoreCase("LEAVE")) {
	                	if (players.contains(player_name)) {
	                		System.out.println(player_name +" ("+ socket.getLocalAddress() +") has left the list of players.");
		                	players.remove(player_name);
		                	out.println("You've left the list of players.");
	                	} else {
	                		out.println("You are not on the list, please JOIN first.");
	                	}
	                } else if (client_input.equalsIgnoreCase("LIST")) {
	                	out.println(players.toString());
	                } else {
	                	System.out.println(client_input);
	                }
	            }
    		} catch (IOException e) {
				e.printStackTrace();
			} finally { //In case anything goes wrong we need to close our I/O streams and sockets.
				try {
					socket.close();
					out.close();
					in.close();
				} catch(Exception e) { 
					System.out.println("Couldn't close I/O streams");
				}
			}
    	}