Updated the code to use the new getPlayerData method.