Now loads player data from the database.

This commit is contained in:
Tastybento 2018-04-21 11:15:49 -07:00
parent 89220d67d3
commit c1517d38b9
1 changed files with 8 additions and 0 deletions

View File

@ -320,6 +320,14 @@ public class ChallengesManager {
addon.getLogger().info("Loading challenges...");
chConfig.loadConfigObjects().forEach(this::storeChallenge);
sortChallenges();
players.loadObjects().forEach(pd -> {
try {
UUID uuid = UUID.fromString(pd.getUniqueId());
playerData.put(uuid,pd);
} catch (Exception e) {
addon.getLogger().severe("UUID for player in challenge data file is invalid!");
}
});
}
/**