getPlayerData fix
This commit is contained in:
parent
294fd6d7df
commit
e11185cf2d
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue