mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-22 18:46:39 +01:00
Fix issue in importing challenges from ASkyBlock when importing crashes with null-pointer.
Null-pointer happened because there were mistake in level unique_id getting. It was leftover from old unique_id scheme...
This commit is contained in:
parent
6f357b3197
commit
54f91180d6
@ -160,8 +160,12 @@ public class ChallengesImportManager
|
||||
newChallenge.setRewardItems(parseItems(details.getString("itemReward", "")));
|
||||
newChallenge.setRepeatItemReward(parseItems(details.getString("repeatItemReward", "")));
|
||||
// Save
|
||||
this.addon.getChallengesManager().addChallengeToLevel(newChallenge,
|
||||
addon.getChallengesManager().getLevel(Util.getWorld(world).getName() + "_" + details.getString("level", "")));
|
||||
if (!details.getString("level", "").isEmpty())
|
||||
{
|
||||
this.addon.getChallengesManager().addChallengeToLevel(newChallenge,
|
||||
addon.getChallengesManager().getLevel(
|
||||
Utils.getGameMode(world) + "_" + details.getString("level", "")));
|
||||
}
|
||||
|
||||
if (addon.getChallengesManager().loadChallenge(newChallenge, overwrite, user, false)) {
|
||||
size++;
|
||||
|
Loading…
Reference in New Issue
Block a user