Reset idle timers when player clicks in-game

When player clicks in-game, he obviously changed his activity, so reset
all idle timers to default non-valid state.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-05-28 11:19:46 +02:00
parent 29442d549d
commit d61f52b8eb

View File

@@ -227,8 +227,9 @@ public class IdleNotifierPlugin extends Plugin
final Player local = client.getLocalPlayer();
final Duration waitDuration = Duration.ofMillis(config.getIdleNotificationDelay());
if (client.getGameState() != GameState.LOGGED_IN || local == null)
if (client.getGameState() != GameState.LOGGED_IN || local == null || client.getMouseIdleTicks() < 10)
{
resetTimers();
return;
}