mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-22 17:18:40 +01:00
Add time_active placeholders
- %plan_time_active_day% - %plan_time_active_day_raw% - %plan_time_active_week% - %plan_time_active_week_raw% - %plan_time_active_month% - %plan_time_active_month_raw% Affects issues: - Close #2721
This commit is contained in:
parent
38774867f7
commit
f41796f079
@ -256,6 +256,39 @@ public class PlayerPlaceHolders implements Placeholders {
|
||||
.toActivePlaytime()
|
||||
);
|
||||
|
||||
placeholders.register("player_time_active_day",
|
||||
player -> time.apply(SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(dayAgo(), now())
|
||||
.toActivePlaytime())
|
||||
);
|
||||
placeholders.register("player_time_active_day_raw",
|
||||
player -> SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(dayAgo(), now())
|
||||
.toActivePlaytime()
|
||||
);
|
||||
|
||||
placeholders.register("player_time_active_week",
|
||||
player -> time.apply(SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(weekAgo(), now())
|
||||
.toActivePlaytime())
|
||||
);
|
||||
placeholders.register("player_time_active_week_raw",
|
||||
player -> SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(weekAgo(), now())
|
||||
.toActivePlaytime()
|
||||
);
|
||||
|
||||
placeholders.register("player_time_active_month",
|
||||
player -> time.apply(SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(monthAgo(), now())
|
||||
.toActivePlaytime())
|
||||
);
|
||||
placeholders.register("player_time_active_month_raw",
|
||||
player -> SessionsMutator.forContainer(player)
|
||||
.filterSessionsBetween(monthAgo(), now())
|
||||
.toActivePlaytime()
|
||||
);
|
||||
|
||||
placeholders.register("player_time_afk",
|
||||
player -> time.apply(SessionsMutator.forContainer(player)
|
||||
.toAfkTime())
|
||||
|
Loading…
Reference in New Issue
Block a user