SteamWar/SpigotCore
Archiviert
13
0

Fixing dynamic implementation

Dieser Commit ist enthalten in:
Lixfel 2020-01-25 13:47:16 +01:00
Ursprung f34cfdd254
Commit f883220618

Datei anzeigen

@ -23,11 +23,15 @@ public class SchematicType {
List<SchematicType> tmpTypes = new LinkedList<>();
Map<String, SchematicType> 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);
}