mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Merge pull request #4078 from Ineusia/master
Missing Section Error Messages (Repair & Salvage Config)
This commit is contained in:
commit
9dcbccb010
@ -3,6 +3,7 @@ package com.gmail.nossr50.config.skills.repair;
|
|||||||
import com.gmail.nossr50.config.ConfigLoader;
|
import com.gmail.nossr50.config.ConfigLoader;
|
||||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
import com.gmail.nossr50.skills.repair.repairables.Repairable;
|
||||||
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
import com.gmail.nossr50.skills.repair.repairables.RepairableFactory;
|
||||||
import com.gmail.nossr50.util.ItemUtils;
|
import com.gmail.nossr50.util.ItemUtils;
|
||||||
@ -26,6 +27,11 @@ public class RepairConfig extends ConfigLoader {
|
|||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
repairables = new ArrayList<Repairable>();
|
repairables = new ArrayList<Repairable>();
|
||||||
|
|
||||||
|
if (!config.isConfigurationSection("Repairables")) {
|
||||||
|
mcMMO.p.getLogger().severe("Could not find Repairables section in " + fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ConfigurationSection section = config.getConfigurationSection("Repairables");
|
ConfigurationSection section = config.getConfigurationSection("Repairables");
|
||||||
Set<String> keys = section.getKeys(false);
|
Set<String> keys = section.getKeys(false);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.config.skills.salvage;
|
|||||||
import com.gmail.nossr50.config.ConfigLoader;
|
import com.gmail.nossr50.config.ConfigLoader;
|
||||||
import com.gmail.nossr50.datatypes.skills.ItemType;
|
import com.gmail.nossr50.datatypes.skills.ItemType;
|
||||||
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
import com.gmail.nossr50.datatypes.skills.MaterialType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
import com.gmail.nossr50.skills.salvage.salvageables.Salvageable;
|
||||||
import com.gmail.nossr50.skills.salvage.salvageables.SalvageableFactory;
|
import com.gmail.nossr50.skills.salvage.salvageables.SalvageableFactory;
|
||||||
import com.gmail.nossr50.util.ItemUtils;
|
import com.gmail.nossr50.util.ItemUtils;
|
||||||
@ -27,6 +28,11 @@ public class SalvageConfig extends ConfigLoader {
|
|||||||
protected void loadKeys() {
|
protected void loadKeys() {
|
||||||
salvageables = new ArrayList<Salvageable>();
|
salvageables = new ArrayList<Salvageable>();
|
||||||
|
|
||||||
|
if (!config.isConfigurationSection("Salvageables")) {
|
||||||
|
mcMMO.p.getLogger().severe("Could not find Salvageables section in " + fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ConfigurationSection section = config.getConfigurationSection("Salvageables");
|
ConfigurationSection section = config.getConfigurationSection("Salvageables");
|
||||||
Set<String> keys = section.getKeys(false);
|
Set<String> keys = section.getKeys(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user