diff --git a/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java index 5de77887..860e3a3a 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java +++ b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java @@ -146,12 +146,12 @@ public final class GameModeConfig { public final List CheckQuestions; /** - * The allowed checkers to check this schematic type denoted by a list of SteamWar ids. + * The allowed checkers to check this schematic type denoted by a list of SteamwarUser ids. * The people need the {@link UserPerm#CHECK} to be able to check though. * * @implSpec {@code []} by default -> denoting every person with {@link UserPerm#CHECK} can check it */ - public final List Checkers; + public final Set Checkers; /** * Bundle for countdowns during the fight @@ -246,7 +246,7 @@ public final class GameModeConfig { } CheckQuestions = loader.getStringList("CheckQuestions"); - Checkers = loader.getIntList("Checkers"); + Checkers = loader.getIntSet("Checkers"); Times = new TimesConfig(loader.with("Times")); // Arena would be here to be in config order but needs Schematic.Size and EnterStages loaded afterwards Schematic = new SchematicConfig<>(loader.with("Schematic")); diff --git a/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java index 39eff9bb..567524ff 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java +++ b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java @@ -139,6 +139,12 @@ final class YMLWrapper { return get(path, o -> (List) o); } + public Set getIntSet(String path) { + List list = get(path, o -> (List) o); + if (list.isEmpty()) return Collections.emptySet(); + return Collections.unmodifiableSet(new HashSet<>(list)); + } + public List getSchematicTypeList(String path) { List list = getStringList(path); if (list.isEmpty()) {