use of com.faendir.zachtronics.bot.inf.model.IfCategory in project zachtronics-leaderboard-bot by F43nd1r.
the class IfShowCommand method findPuzzleAndCategory.
@NotNull
@Override
public Pair<IfPuzzle, IfCategory> findPuzzleAndCategory(@NotNull ShowData parameters) {
IfPuzzle puzzle = parameters.puzzle;
IfCategory category = parameters.category;
if (!parameters.puzzle.getSupportedCategories().contains(category))
throw new IllegalArgumentException("Category " + category.getDisplayName() + " does not support " + puzzle.getDisplayName());
return new Pair<>(puzzle, category);
}
Aggregations