Skip to content

Commit

Permalink
Add unformatted top player list queries
Browse files Browse the repository at this point in the history
- %plan_top_{category}_{n}_value_raw%

Affects issues:
- Close #3729
  • Loading branch information
AuroraLS3 committed Nov 30, 2024
1 parent 22e0b8e commit 7e46c6e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ private void registerDynamicCategoryPlaceholders(PlanPlaceholders placeholders,
.map(TopListQueries.TopListEntry::getValue)
.map(query.getCategory().equals("player_kills") ? Function.identity() : formatters.timeAmount())
.orElse("-"));
placeholders.registerStatic(String.format("top_%s_%s_%s_value_raw", query.getCategory(), query.getTimeSpan(), nth + 1),
parameters -> database.query(query.getQuery(nth, parameters))
.map(TopListQueries.TopListEntry::getValue)
.map(String::valueOf)
.orElse("-"));
}
}
}
Expand Down

0 comments on commit 7e46c6e

Please sign in to comment.