mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
How did I not realize this would loop forever...
This commit is contained in:
parent
2662fee9fb
commit
2042e0cdbd
@ -52,12 +52,10 @@ public class CustomArmorConfig extends ConfigLoader {
|
||||
protected void loadKeys() {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
while (!needsUpdate) {
|
||||
loadArmor("Boots", customBoots);
|
||||
loadArmor("Chestplates", customChestplates);
|
||||
loadArmor("Helmets", customHelmets);
|
||||
loadArmor("Leggings", customLeggings);
|
||||
}
|
||||
loadArmor("Boots", customBoots);
|
||||
loadArmor("Chestplates", customChestplates);
|
||||
loadArmor("Helmets", customHelmets);
|
||||
loadArmor("Leggings", customLeggings);
|
||||
|
||||
if (needsUpdate) {
|
||||
needsUpdate = false;
|
||||
@ -66,6 +64,10 @@ public class CustomArmorConfig extends ConfigLoader {
|
||||
}
|
||||
|
||||
private void loadArmor(String armorType, List<Material> materialList) {
|
||||
if (needsUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigurationSection armorSection = config.getConfigurationSection(armorType);
|
||||
|
||||
if (armorSection == null) {
|
||||
|
@ -43,13 +43,11 @@ public class CustomBlockConfig extends ConfigLoader {
|
||||
|
||||
@Override
|
||||
protected void loadKeys() {
|
||||
while (!needsUpdate) {
|
||||
loadBlocks("Excavation", customExcavationBlocks);
|
||||
loadBlocks("Herbalism", customHerbalismBlocks);
|
||||
loadBlocks("Mining", customMiningBlocks);
|
||||
loadBlocks("Woodcutting", customWoodcuttingBlocks);
|
||||
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
||||
}
|
||||
loadBlocks("Excavation", customExcavationBlocks);
|
||||
loadBlocks("Herbalism", customHerbalismBlocks);
|
||||
loadBlocks("Mining", customMiningBlocks);
|
||||
loadBlocks("Woodcutting", customWoodcuttingBlocks);
|
||||
loadBlocks("Ability_Blocks", customAbilityBlocks);
|
||||
|
||||
if (needsUpdate) {
|
||||
needsUpdate = false;
|
||||
@ -58,6 +56,10 @@ public class CustomBlockConfig extends ConfigLoader {
|
||||
}
|
||||
|
||||
private void loadBlocks(String skillType, List<MaterialData> blockList) {
|
||||
if (needsUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigurationSection skillSection = config.getConfigurationSection(skillType);
|
||||
|
||||
if (skillSection == null) {
|
||||
|
@ -58,14 +58,12 @@ public class CustomToolConfig extends ConfigLoader {
|
||||
protected void loadKeys() {
|
||||
repairables = new ArrayList<Repairable>();
|
||||
|
||||
while (!needsUpdate) {
|
||||
loadTool("Axes", customAxes);
|
||||
loadTool("Bows", customBows);
|
||||
loadTool("Hoes", customHoes);
|
||||
loadTool("Pickaxes", customPickaxes);
|
||||
loadTool("Shovels", customShovels);
|
||||
loadTool("Swords", customSwords);
|
||||
}
|
||||
loadTool("Axes", customAxes);
|
||||
loadTool("Bows", customBows);
|
||||
loadTool("Hoes", customHoes);
|
||||
loadTool("Pickaxes", customPickaxes);
|
||||
loadTool("Shovels", customShovels);
|
||||
loadTool("Swords", customSwords);
|
||||
|
||||
if (needsUpdate) {
|
||||
needsUpdate = false;
|
||||
@ -74,6 +72,10 @@ public class CustomToolConfig extends ConfigLoader {
|
||||
}
|
||||
|
||||
private void loadTool(String toolType, List<Material> materialList) {
|
||||
if (needsUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigurationSection toolSection = config.getConfigurationSection(toolType);
|
||||
|
||||
if (toolSection == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user