File tree Expand file tree Collapse file tree
Essentials/src/main/java/com/earth2me/essentials Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,17 @@ default boolean hasOutstandingTeleportRequest() {
177177
178178 String getFormattedJailTime ();
179179
180+ /**
181+ * Returns last activity time.
182+ * <p>
183+ * It is used internally to determine if user's afk status should be set to
184+ * true because of ACTIVITY {@link AfkStatusChangeEvent.Cause}, or the player
185+ * should be kicked for being afk too long.
186+ *
187+ * @return Last activity time (Epoch Milliseconds)
188+ */
189+ long getLastActivityTime ();
190+
180191 @ Deprecated
181192 List <String > getMails ();
182193
Original file line number Diff line number Diff line change @@ -775,6 +775,11 @@ public boolean checkMuteTimeout(final long currentTime) {
775775 return false ;
776776 }
777777
778+ @ Override
779+ public long getLastActivityTime () {
780+ return this .lastActivity ;
781+ }
782+
778783 @ Deprecated
779784 public void updateActivity (final boolean broadcast ) {
780785 updateActivity (broadcast , AfkStatusChangeEvent .Cause .UNKNOWN );
You can’t perform that action at this time.
0 commit comments