use of com.faendir.zachtronics.bot.sc.model.ScCategory in project zachtronics-leaderboard-bot by F43nd1r.
the class ScShowCommand method findPuzzleAndCategory.
@NotNull
@Override
public Pair<ScPuzzle, ScCategory> findPuzzleAndCategory(@NotNull ShowData parameters) {
ScPuzzle puzzle = parameters.puzzle;
ScCategory 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