diff --git a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java index 37d4c73..6049606 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java +++ b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java @@ -1,6 +1,7 @@ package de.steamwar.sql; import de.steamwar.core.Core; +import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import java.io.File; @@ -23,8 +24,10 @@ public class SchematicType { List tmpTypes = new LinkedList<>(); Map tmpFromDB = new HashMap<>(); for(String type : config.getKeys(false)){ - String checktype = config.getString("checktype"); - SchematicType current = new SchematicType(type, config.getString("kuerzel"), Type.valueOf(config.getString("type")), checktype != null ? fromDB(checktype) : null); + ConfigurationSection section = config.getConfigurationSection(type); + assert section != null; + String checktype = section.getString("checktype"); + SchematicType current = new SchematicType(type, section.getString("kuerzel"), Type.valueOf(section.getString("type")), checktype != null ? fromDB(checktype) : null); tmpTypes.add(current); tmpFromDB.put(type, current); }