Improve YMLWrapper

This commit is contained in:
2025-10-26 09:14:34 +01:00
parent 4405d9c25d
commit aec03e41a1
14 changed files with 163 additions and 314 deletions
@@ -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);