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>
<includes>
<include>*.yml</include>
<include>*.json</include>
</includes>
</resource>
</resources>

View File

@ -83,7 +83,7 @@ public class ChallengesImportManager
DefaultDataHolder defaultChallenges = new DefaultJSONHandler(this.addon).loadObject();
// 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
challenge.setUniqueId(uniqueIDPrefix + challenge.getUniqueId());
// Set up correct level ID if it is necessary
@ -95,7 +95,7 @@ public class ChallengesImportManager
manager.loadChallenge(challenge, false, user, user == null);
});
defaultChallenges.getLevelList().parallelStream().forEach(challengeLevel -> {
defaultChallenges.getLevelList().forEach(challengeLevel -> {
// Set correct level ID
challengeLevel.setUniqueId(uniqueIDPrefix + challengeLevel.getUniqueId());
// Set correct world name

View File

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