getPlayerData fix

This commit is contained in:
Tyler Murphy 2021-08-13 22:48:21 -04:00
parent 294fd6d7df
commit e11185cf2d

View file

@ -39,7 +39,12 @@ public class Store {
} }
public static int getPlayerData(String playerName, String key) { public static int getPlayerData(String playerName, String key) {
return playerData.get(playerName + " " + key) == null ? 0 : playerData.get(playerName + "" + key); if(playerData == null) return 0;
if(playerData.get(playerName + " " + key) == null) {
return 0;
} else {
return playerData.get(playerName + " " + key);
}
} }
public static void setPlayerData(String playerName, String key, int value) { public static void setPlayerData(String playerName, String key, int value) {