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.fightsystem;
import de.steamwar.data.GameModeConfig;
import de.steamwar.data.YMLWrapperImpl;
import de.steamwar.data.YMLWrapper;
import de.steamwar.data.YMLWrapperUtils;
import de.steamwar.fightsystem.utils.Region;
import de.steamwar.fightsystem.winconditions.Winconditions;
import de.steamwar.sql.*;
@@ -109,7 +110,7 @@ public class Config {
Bukkit.getLogger().log(Level.SEVERE, "Arenaconfig fehlt!");
Bukkit.shutdown();
}
GameModeConfig = new GameModeConfig<>(YMLWrapperImpl.ofTyped(new File(FightSystem.getPlugin().getDataFolder(), configFile), Winconditions::valueOf));
GameModeConfig = new GameModeConfig<>(new File(FightSystem.getPlugin().getDataFolder(), configFile), YMLWrapperUtils.ToMaterial, YMLWrapper.ToSchematicType, Winconditions::valueOf, YMLWrapper.ToStaticWarGear);
File worldConfigFile = new File(world.getWorldFolder(), "config.yml");
if(!worldConfigFile.exists()) {