Compare commits

...
Author SHA1 Message Date
SteamWar Backport Bot b8d61da881 Backport CommonCore changes from #430
Pull Request Build / Build (pull_request) Has been cancelled
VelocityCore /check command
2026-06-17 19:18:03 +00:00
Chaoscaot 56fd93a474 Merge branch 'main' into version/legacy
Deploy / Build (push) Successful in 1m24s
Deploy / Deploy (push) Failing after 8s
2026-05-15 16:02:51 +02:00
steamwar-ci-bot c27789daa8 Merge pull request 'Backport CommonCore changes from #354 to version/legacy' (#355) from backport/commoncore/pr-354-to-version-legacy into version/legacy
Deploy / Build (push) Successful in 1m23s
Deploy / Deploy (push) Successful in 7s
Reviewed-on: #355
2026-05-15 15:22:33 +02:00
SteamWar Backport Bot 56a7344d67 Backport CommonCore changes from #354
Pull Request Build / Build (pull_request) Failing after 1m11s
Test Backporting
2026-05-15 13:09:59 +00:00
2 changed files with 9 additions and 3 deletions
@@ -146,12 +146,12 @@ public final class GameModeConfig<M, W> {
public final List<String> 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<Integer> Checkers;
public final Set<Integer> Checkers;
/**
* Bundle for countdowns during the fight
@@ -246,7 +246,7 @@ public final class GameModeConfig<M, W> {
}
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"));
@@ -139,6 +139,12 @@ final class YMLWrapper<M, W> {
return get(path, o -> (List<Integer>) o);
}
public Set<Integer> getIntSet(String path) {
List<Integer> list = get(path, o -> (List<Integer>) o);
if (list.isEmpty()) return Collections.emptySet();
return Collections.unmodifiableSet(new HashSet<>(list));
}
public List<SchematicType> getSchematicTypeList(String path) {
List<String> list = getStringList(path);
if (list.isEmpty()) {