@Subscribe
	public void onGameTick(GameTick event)
	{
		final Player local = client.getLocalPlayer();
		final Duration waitDuration = Duration.ofMillis(config.getIdleNotificationDelay());
		lastCombatCountdown = Math.max(lastCombatCountdown - 1, 0);

		if (client.getGameState() != GameState.LOGGED_IN
			|| local == null
			// If user has clicked in the last second then they're not idle so don't send idle notification
			|| System.currentTimeMillis() - client.getMouseLastPressedMillis() < 1000
			|| client.getKeyboardIdleTicks() < 10)
		{
			resetTimers();
			return;
		}

		if (checkIdleLogout())
		{
			notifier.notify(config.logoutIdle(), "You are about to log out from idling too long!");
		}

		if (check6hrLogout())
		{
			notifier.notify("You are about to log out from being online for 6 hours!");
		}

		if (checkAnimationIdle(waitDuration, local))
		{
			notifier.notify(config.animationIdle(), "You are now idle!");
		}

		if (checkMovementIdle(waitDuration, local))
		{
			notifier.notify(config.movementIdle(), "You have stopped moving!");
		}

		if (checkInteractionIdle(waitDuration, local))
		{
			if (lastInteractWasCombat)
			{
				notifier.notify(config.interactionIdle(), "You are now out of combat!");
			}
			else
			{
				notifier.notify(config.interactionIdle(), "You are now idle!");
			}
		}

		if (checkLowHitpoints())
		{
			notifier.notify(config.getHitpointsNotification(), "You have low hitpoints!");
		}

		if (checkLowPrayer())
		{
			notifier.notify(config.getPrayerNotification(), "You have low prayer!");
		}

		if (checkLowEnergy())
		{
			notifier.notify(config.getLowEnergyNotification(), "You have low run energy!");
		}

		if (checkHighEnergy())
		{
			notifier.notify(config.getHighEnergyNotification(), "You have restored run energy!");
		}

		if (checkLowOxygen())
		{
			notifier.notify(config.getOxygenNotification(), "You have low oxygen!");
		}

		if (checkFullSpecEnergy())
		{
			notifier.notify(config.getSpecNotification(), "You have restored spec energy!");
		}
	}
@Test
	public void testSpecRegen()
	{
		when(config.getSpecNotification()).thenReturn(Notification.ON);
		when(config.getSpecEnergyThreshold()).thenReturn(50);

		when(client.getVarpValue(eq(VarPlayer.SPECIAL_ATTACK_PERCENT))).thenReturn(400); // 40%
		plugin.onGameTick(new GameTick()); // once to set lastSpecEnergy to 400
		verify(notifier, never()).notify(any());

		when(client.getVarpValue(eq(VarPlayer.SPECIAL_ATTACK_PERCENT))).thenReturn(500); // 50%
		plugin.onGameTick(new GameTick());
		verify(notifier).notify(Notification.ON, "You have restored spec energy!");
	}