Add unformatted top player list queries

- %plan_top_{category}_{n}_value_raw%

Affects issues:
- Close #3729
This commit is contained in:
Aurora Lahtela 2024-11-30 13:29:33 +02:00
parent 22e0b8ed82
commit 7e46c6ef63

View File

@ -252,6 +252,11 @@ public class ServerPlaceHolders implements 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("-"));
}
}
}