Skip to content

Commit

Permalink
Add network session placeholders
Browse files Browse the repository at this point in the history
Affects issues:
- Close #2267
  • Loading branch information
AuroraLS3 committed Jan 27, 2024
1 parent 465af8e commit 01ce503
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ private Optional<ServerUUID> getServerUUIDForServerIdentifier(@Untrusted String
private void registerDynamicCategoryPlaceholders(PlanPlaceholders placeholders, Database database) {
List<TopCategoryQuery<Long>> queries = new ArrayList<>();
queries.addAll(createCategoryQueriesForAllTimespans("playtime", (index, timespan, parameters) -> TopListQueries.fetchNthTop10PlaytimePlayerOn(getServerUUID(parameters), index, System.currentTimeMillis() - timespan, System.currentTimeMillis())));
queries.addAll(createCategoryQueriesForAllTimespans("network_playtime", (index, timespan, parameters) -> TopListQueries.fetchNthTop10PlaytimePlayerOn(null, index, System.currentTimeMillis() - timespan, System.currentTimeMillis())));
queries.addAll(createCategoryQueriesForAllTimespans("active_playtime", (index, timespan, parameters) -> TopListQueries.fetchNthTop10ActivePlaytimePlayerOn(getServerUUID(parameters), index, System.currentTimeMillis() - timespan, System.currentTimeMillis())));
queries.addAll(createCategoryQueriesForAllTimespans("network_active_playtime", (index, timespan, parameters) -> TopListQueries.fetchNthTop10ActivePlaytimePlayerOn(null, index, System.currentTimeMillis() - timespan, System.currentTimeMillis())));
queries.addAll(createCategoryQueriesForAllTimespans("player_kills", (index, timespan, parameters) -> TopListQueries.fetchNthTop10PlayerKillCountOn(getServerUUID(parameters), index, System.currentTimeMillis() - timespan, System.currentTimeMillis())));

for (int i = 0; i < 10; i++) {
Expand Down
Loading

0 comments on commit 01ce503

Please # to comment.