From 6d8b1cb761ef57a4a0bdaa9e5ec5bfaaaac8d556 Mon Sep 17 00:00:00 2001 From: BONNe1704 Date: Wed, 28 Aug 2019 17:21:39 +0300 Subject: [PATCH] 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. --- pom.xml | 1 + .../bentobox/challenges/ChallengesImportManager.java | 4 ++-- src/main/resources/default.json | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 60d61f5..2814cf2 100644 --- a/pom.xml +++ b/pom.xml @@ -188,6 +188,7 @@ false *.yml + *.json diff --git a/src/main/java/world/bentobox/challenges/ChallengesImportManager.java b/src/main/java/world/bentobox/challenges/ChallengesImportManager.java index d850352..42b487f 100644 --- a/src/main/java/world/bentobox/challenges/ChallengesImportManager.java +++ b/src/main/java/world/bentobox/challenges/ChallengesImportManager.java @@ -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 diff --git a/src/main/resources/default.json b/src/main/resources/default.json index 9d2988a..0601c33 100644 --- a/src/main/resources/default.json +++ b/src/main/resources/default.json @@ -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}" } \ No newline at end of file