forked from SteamWar/SteamWar
Improve YMLWrapper
This commit is contained in:
+3
-2
@@ -20,7 +20,8 @@
|
||||
package de.steamwar.schematicsystem;
|
||||
|
||||
import de.steamwar.data.GameModeConfig;
|
||||
import de.steamwar.data.YMLWrapperImpl;
|
||||
import de.steamwar.data.YMLWrapper;
|
||||
import de.steamwar.data.YMLWrapperUtils;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.bukkit.Material;
|
||||
@@ -38,7 +39,7 @@ public class CheckSchemTypeManager {
|
||||
File folder = new File(SchematicSystem.getInstance().getDataFolder().getParentFile(), "FightSystem");
|
||||
if(folder.exists()) {
|
||||
for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) {
|
||||
GameModeConfig<Material, SchematicType, String> gameModeConfig = new GameModeConfig<>(YMLWrapperImpl.ofTyped(configFile));
|
||||
GameModeConfig<Material, SchematicType, String> gameModeConfig = new GameModeConfig<>(configFile, YMLWrapperUtils.ToMaterial, YMLWrapper.ToSchematicType, YMLWrapper.ToString, YMLWrapper.ToStaticWarGear);
|
||||
if (gameModeConfig.CheckQuestions.isEmpty() && gameModeConfig.Schematic.ManualCheck)
|
||||
continue;
|
||||
types.put(gameModeConfig.Schematic.Type, gameModeConfig);
|
||||
|
||||
Reference in New Issue
Block a user