From f883220618b3876dcd743a92ac7ecf2fca86537d Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 25 Jan 2020 13:47:16 +0100 Subject: [PATCH] Fixing dynamic implementation --- SpigotCore_Main/src/de/steamwar/sql/SchematicType.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java index 32c81dd..9d3cadd 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java +++ b/SpigotCore_Main/src/de/steamwar/sql/SchematicType.java @@ -23,11 +23,15 @@ public class SchematicType { List tmpTypes = new LinkedList<>(); Map tmpFromDB = new HashMap<>(); + + tmpTypes.add(Normal); + tmpFromDB.put(Normal.name().toLowerCase(), Normal); + for(String type : config.getKeys(false)){ 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); + SchematicType current = new SchematicType(type, section.getString("kuerzel"), Type.valueOf(section.getString("type")), checktype != null ? tmpFromDB.get(checktype) : null); tmpTypes.add(current); tmpFromDB.put(type.toLowerCase(), current); }