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:
@@ -227,8 +227,9 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
final Player local = client.getLocalPlayer();
|
final Player local = client.getLocalPlayer();
|
||||||
final Duration waitDuration = Duration.ofMillis(config.getIdleNotificationDelay());
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user