Fix issue when challenges are not saved in database after importing from web or default file set.

This commit is contained in:
BONNe 2020-05-26 10:19:32 +03:00
parent 6203b92f2e
commit 679fe48871
2 changed files with 6 additions and 4 deletions

View File

@ -126,7 +126,8 @@ public class ChallengesImportManager
return false;
}
this.addon.getChallengesManager().save();
this.addon.getChallengesManager().saveChallenges();
this.addon.getChallengesManager().saveLevels();
if (removeAtEnd)
{
@ -203,7 +204,8 @@ public class ChallengesImportManager
return false;
}
this.addon.getChallengesManager().save();
this.addon.getChallengesManager().saveChallenges();
this.addon.getChallengesManager().saveLevels();
return true;
}

View File

@ -861,7 +861,7 @@ public class ChallengesManager
/**
* This method saves all challenges to database.
*/
private void saveChallenges()
public void saveChallenges()
{
this.challengeCacheData.values().forEach(this::saveChallenge);
}
@ -880,7 +880,7 @@ public class ChallengesManager
/**
* This method saves all levels to database.
*/
private void saveLevels()
public void saveLevels()
{
this.levelCacheData.values().forEach(this::saveLevel);
}