Fixes idle notifications occurring when they shouldn't (interacting with bankers/players). See #282

This commit is contained in:
utsukami
2018-01-08 07:49:39 -05:00
parent 26aec4fe1c
commit d1aa41688a

View File

@@ -264,7 +264,12 @@ public class IdleNotifierPlugin extends Plugin
}
Actor opponent = local.getInteracting();
if (opponent != null && opponent.getCombatLevel() > 0)
boolean isPlayer = opponent instanceof Player;
if (opponent != null
&& !isPlayer
&& opponent.getCombatLevel() > 0
&& opponent.getHealth() != -1)
{
lastInteracting = Instant.now();
}