From 7f167e73ea19b2707edd946be5344901df4875af Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 20 Jan 2020 06:59:15 +0100 Subject: [PATCH] Hotfix SchematicType --- SpigotCore_Main/src/de/steamwar/sql/SchematicType.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }