mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-04-06 13:30:43 +08:00
Expose IUser#getLastActivityTime
to API (#6101)
This commit is contained in:
parent
46ba679c02
commit
40540ebb3d
@ -177,6 +177,17 @@ public interface IUser {
|
||||
|
||||
String getFormattedJailTime();
|
||||
|
||||
/**
|
||||
* Returns last activity time.
|
||||
* <p>
|
||||
* 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<String> getMails();
|
||||
|
||||
|
@ -775,6 +775,11 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLastActivityTime() {
|
||||
return this.lastActivity;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void updateActivity(final boolean broadcast) {
|
||||
updateActivity(broadcast, AfkStatusChangeEvent.Cause.UNKNOWN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user