Improve YMLWrapper

This commit is contained in:
2025-10-26 09:22:48 +01:00
parent aec03e41a1
commit d216aac2c4
11 changed files with 20 additions and 34 deletions
@@ -22,7 +22,6 @@ package de.steamwar.sql;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import de.steamwar.data.GameModeConfig;
import de.steamwar.data.YMLWrapper;
import de.steamwar.velocitycore.VelocityCore;
import de.steamwar.velocitycore.commands.CheckCommand;
@@ -40,7 +39,7 @@ public class SQLWrapperImpl implements SQLWrapper {
return;
for(File file : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().toList()) {
GameModeConfig<String, String, String> gameModeConfig = new GameModeConfig<>(file, YMLWrapper.ToString, YMLWrapper.ToString, YMLWrapper.ToString, YMLWrapper.ToInternalName);
GameModeConfig<String, String, String> gameModeConfig = new GameModeConfig<>(file, GameModeConfig.ToString, GameModeConfig.ToString, GameModeConfig.ToString, GameModeConfig.ToInternalName);
if (!gameModeConfig.Schematic.loaded) continue;
if (tmpFromDB.containsKey(gameModeConfig.Schematic.Type.toLowerCase())) continue;
@@ -20,7 +20,6 @@
package de.steamwar.velocitycore;
import de.steamwar.data.GameModeConfig;
import de.steamwar.data.YMLWrapper;
import de.steamwar.sql.SchematicType;
import lombok.Getter;
import lombok.experimental.UtilityClass;
@@ -52,7 +51,7 @@ public class ArenaMode {
return;
for(File file : Arrays.stream(folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))).sorted().toList()) {
GameModeConfig<String, SchematicType, String> gameModeConfig = new GameModeConfig<>(file, YMLWrapper.ToString, YMLWrapper.ToSchematicType, YMLWrapper.ToString, YMLWrapper.ToInternalName);
GameModeConfig<String, SchematicType, String> gameModeConfig = new GameModeConfig<>(file, GameModeConfig.ToString, GameModeConfig.ToSchematicType, GameModeConfig.ToString, GameModeConfig.ToInternalName);
if (!gameModeConfig.Server.loaded) continue;
allModes.add(gameModeConfig);