mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-24 01:57:58 +01:00
Small cleanup to checkActivity
This commit is contained in:
parent
b03a327f9b
commit
118b3638eb
@ -468,10 +468,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
public void checkActivity()
|
public void checkActivity()
|
||||||
{
|
{
|
||||||
final long autoafkkick = ess.getSettings().getAutoAfkKick();
|
final long autoafkkick = ess.getSettings().getAutoAfkKick();
|
||||||
if (autoafkkick > 0 && lastActivity + autoafkkick * 1000 < System.currentTimeMillis()
|
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis()
|
||||||
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
|
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
|
||||||
{
|
{
|
||||||
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
|
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
|
||||||
|
lastActivity = 0;
|
||||||
kickPlayer(kickReason);
|
kickPlayer(kickReason);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user