Make SchematicType static init type safe

This commit is contained in:
2025-10-26 13:14:11 +01:00
parent dfbeab7b90
commit 79ebdcea85
5 changed files with 27 additions and 9 deletions
@@ -26,7 +26,7 @@ import de.steamwar.velocitycore.commands.CheckCommand;
import java.io.File;
public class SQLWrapperImpl implements SQLWrapper {
public class SQLWrapperImpl implements SQLWrapper<String> {
@Override
public File getSchemTypesFolder() {
@@ -34,7 +34,12 @@ public class SQLWrapperImpl implements SQLWrapper {
}
@Override
public void processSchematicType(GameModeConfig<String, String> gameModeConfig) {
public GameModeConfig<String, String> loadGameModeConfig(File file) {
return new GameModeConfig<>(file, GameModeConfig.ToString, GameModeConfig.ToString, GameModeConfig.ToInternalName);
}
@Override
public void processSchematicType(GameModeConfig<?, String> gameModeConfig) {
SchematicType type = gameModeConfig.Schematic.Type;
if (type.checkType() != null) {
CheckCommand.setCheckQuestions(type.checkType(), gameModeConfig.CheckQuestions);