SteamWar/SpigotCore
Archiviert
13
0

Hotfix SchematicType

Dieser Commit ist enthalten in:
Lixfel 2020-01-20 06:59:15 +01:00
Ursprung f08decf551
Commit 7f167e73ea

Datei anzeigen

@ -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<SchematicType> tmpTypes = new LinkedList<>();
Map<String, SchematicType> 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);
}