From 40540ebb3d9b126fa899109e6e4695152108e297 Mon Sep 17 00:00:00 2001 From: maxcom1 <46265094+maxcom1@users.noreply.github.com> Date: Mon, 24 Mar 2025 17:29:06 +0100 Subject: [PATCH] Expose `IUser#getLastActivityTime` to API (#6101) --- .../src/main/java/com/earth2me/essentials/IUser.java | 11 +++++++++++ .../src/main/java/com/earth2me/essentials/User.java | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/Essentials/src/main/java/com/earth2me/essentials/IUser.java b/Essentials/src/main/java/com/earth2me/essentials/IUser.java index bd3b3ec19..8fce2df96 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/IUser.java +++ b/Essentials/src/main/java/com/earth2me/essentials/IUser.java @@ -177,6 +177,17 @@ public interface IUser { String getFormattedJailTime(); + /** + * Returns last activity time. + *
+ * It is used internally to determine if user's afk status should be set to
+ * true because of ACTIVITY {@link AfkStatusChangeEvent.Cause}, or the player
+ * should be kicked for being afk too long.
+ *
+ * @return Last activity time (Epoch Milliseconds)
+ */
+ long getLastActivityTime();
+
@Deprecated
List