mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-11-19 01:40:00 +00:00
Add 10 seconds of graceful time before doing first check to prevent misinterpretation of lack of activity.
This commit is contained in:
parent
c56dd6e302
commit
06417910e2
1 changed files with 5 additions and 0 deletions
|
@ -494,6 +494,11 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||
}
|
||||
|
||||
public void checkActivity() {
|
||||
// Graceful time before the first afk check call.
|
||||
if (System.currentTimeMillis() - lastActivity <= 10000) {
|
||||
return;
|
||||
}
|
||||
|
||||
final long autoafkkick = ess.getSettings().getAutoAfkKick();
|
||||
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis() && !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt")) {
|
||||
final String kickReason = tl("autoAfkKickReason", autoafkkick / 60.0);
|
||||
|
|
Loading…
Reference in a new issue