1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-06-25 18:24:43 +02:00

NPE prevention for Users.getProfile()

This commit is contained in:
bm01
2012-07-08 00:02:40 +02:00
parent f4ecbe7f65
commit 4469637f27

@ -97,7 +97,9 @@ public class Users {
* @return the player's profile
*/
public static PlayerProfile getProfile(String playerName) {
return players.get(playerName).getProfile();
McMMOPlayer mcmmoPlayer = players.get(playerName);
return (mcmmoPlayer != null) ? mcmmoPlayer.getProfile() : null;
}
/**