From 5c2418dae2892a88001463161a5b341f2833c026 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Sun, 7 Jun 2020 12:19:20 +0300 Subject: [PATCH] Added %plan_sessions_unique_players_today% Affects issues: - Fixed #1480 --- .../com/djrapitops/plan/placeholder/SessionPlaceHolders.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/placeholder/SessionPlaceHolders.java b/Plan/common/src/main/java/com/djrapitops/plan/placeholder/SessionPlaceHolders.java index d67082c0a..b6c2449dc 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/placeholder/SessionPlaceHolders.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/placeholder/SessionPlaceHolders.java @@ -119,6 +119,10 @@ public class SessionPlaceHolders implements Placeholders { placeholders.registerStatic("sessions_unique_players_day", () -> database.query(PlayerCountQueries.uniquePlayerCount(dayAgo(), now(), serverUUID))); + placeholders.registerStatic("sessions_unique_players_today", + () -> database.query(PlayerCountQueries.uniquePlayerCounts(dayAgo(), now(), config.getTimeZone().getOffset(now()), serverUUID)) + .lastEntry().getValue()); + placeholders.registerStatic("sessions_unique_players_week", () -> database.query(PlayerCountQueries.uniquePlayerCount(weekAgo(), now(), serverUUID)));