diff --git a/src/main/java/net/tylermurphy/hideAndSeek/Store.java b/src/main/java/net/tylermurphy/hideAndSeek/Store.java index 090bd2c..d628ad1 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/Store.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/Store.java @@ -39,7 +39,12 @@ public class Store { } 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) {