Fix some issues in default challenges.

- remove parallel stream reading, as it may not load all challenges/levels.
- fix chef challenge not detected by level.
- fix some typos.
This commit is contained in:
BONNe1704 2019-08-28 17:21:39 +03:00
parent 9a97b5ed53
commit 6d8b1cb761
3 changed files with 8 additions and 7 deletions

View File

@ -188,6 +188,7 @@
<filtering>false</filtering> <filtering>false</filtering>
<includes> <includes>
<include>*.yml</include> <include>*.yml</include>
<include>*.json</include>
</includes> </includes>
</resource> </resource>
</resources> </resources>

View File

@ -83,7 +83,7 @@ public class ChallengesImportManager
DefaultDataHolder defaultChallenges = new DefaultJSONHandler(this.addon).loadObject(); DefaultDataHolder defaultChallenges = new DefaultJSONHandler(this.addon).loadObject();
// All new challenges should get correct ID. So we need to map it to loaded challenges. // All new challenges should get correct ID. So we need to map it to loaded challenges.
defaultChallenges.getChallengeList().parallelStream().forEach(challenge -> { defaultChallenges.getChallengeList().forEach(challenge -> {
// Set correct challenge ID // Set correct challenge ID
challenge.setUniqueId(uniqueIDPrefix + challenge.getUniqueId()); challenge.setUniqueId(uniqueIDPrefix + challenge.getUniqueId());
// Set up correct level ID if it is necessary // Set up correct level ID if it is necessary
@ -95,7 +95,7 @@ public class ChallengesImportManager
manager.loadChallenge(challenge, false, user, user == null); manager.loadChallenge(challenge, false, user, user == null);
}); });
defaultChallenges.getLevelList().parallelStream().forEach(challengeLevel -> { defaultChallenges.getLevelList().forEach(challengeLevel -> {
// Set correct level ID // Set correct level ID
challengeLevel.setUniqueId(uniqueIDPrefix + challengeLevel.getUniqueId()); challengeLevel.setUniqueId(uniqueIDPrefix + challengeLevel.getUniqueId());
// Set correct world name // Set correct world name

View File

@ -1487,7 +1487,7 @@
"takeMoney": false, "takeMoney": false,
"requiredIslandLevel": 0, "requiredIslandLevel": 0,
"searchRadius": 10, "searchRadius": 10,
"rewardText": "These saplings will help you to get more trees", "rewardText": "Some redstone will always be handy!",
"rewardItems": [ "rewardItems": [
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1631\n type: REDSTONE\n amount: 27\n" "is:\n ==: org.bukkit.inventory.ItemStack\n v: 1631\n type: REDSTONE\n amount: 27\n"
], ],
@ -1495,7 +1495,7 @@
"rewardMoney": 0, "rewardMoney": 0,
"rewardCommands": [], "rewardCommands": [],
"repeatable": true, "repeatable": true,
"repeatRewardText": "These saplings will help you to get more trees", "repeatRewardText": "Some redstone will always be handy!",
"maxTimes": 100, "maxTimes": 100,
"repeatExperienceReward": 5, "repeatExperienceReward": 5,
"repeatItemReward": [ "repeatItemReward": [
@ -2046,7 +2046,7 @@
"friendlyName": "Grinder", "friendlyName": "Grinder",
"deployed": true, "deployed": true,
"description": [ "description": [
"Use your mobfarm to collest mob drops" "Use your mobfarm to collect mob drops"
], ],
"icon": "is:\n ==: org.bukkit.inventory.ItemStack\n v: 1631\n type: BONE\n", "icon": "is:\n ==: org.bukkit.inventory.ItemStack\n v: 1631\n type: BONE\n",
"order": 4, "order": 4,
@ -2872,7 +2872,7 @@
"alchemist", "alchemist",
"netherkiller", "netherkiller",
"goldage", "goldage",
"cheff", "chef",
"advanced", "advanced",
"dj", "dj",
"icefarmer", "icefarmer",
@ -2912,5 +2912,5 @@
] ]
} }
], ],
"version": "0.7.0-SNAPSHOT-LOCAL" "version": "${version}${build.number}"
} }