diff --git a/src/main/java/world/bentobox/boxed/AdvancementsManager.java b/src/main/java/world/bentobox/boxed/AdvancementsManager.java index cd3ca9f..0f6b141 100644 --- a/src/main/java/world/bentobox/boxed/AdvancementsManager.java +++ b/src/main/java/world/bentobox/boxed/AdvancementsManager.java @@ -32,6 +32,7 @@ public class AdvancementsManager { // A cache of island levels. private final Map cache; private final YamlConfiguration advConfig; + private int unknownAdvChange; /** * @param addon @@ -53,6 +54,7 @@ public class AdvancementsManager { } else { try { advConfig.load(advFile); + unknownAdvChange = advConfig.getInt("settings.unknown-advancement-increase", 0); } catch (IOException | InvalidConfigurationException e) { addon.logError("advancements.yml cannot be found! " + e.getLocalizedMessage()); } @@ -152,7 +154,7 @@ public class AdvancementsManager { return 0; } // Check score of advancement - int score = advConfig.getInt("advancements." + advancement.getKey().toString()); + int score = advConfig.getInt("advancements." + advancement.getKey().toString(), this.unknownAdvChange); if (score == 0) { return 0; } diff --git a/src/main/resources/advancements.yml b/src/main/resources/advancements.yml index f59359b..5681841 100644 --- a/src/main/resources/advancements.yml +++ b/src/main/resources/advancements.yml @@ -1,3 +1,6 @@ +# Lists how many blocks the box will increase when advancement occurs +settings: + unknown-advancement-increase: 1 advancements: 'minecraft:adventure/adventuring_time': 1 'minecraft:adventure/arbalistic': 1