private void CheckUpdateSettings(ServerSettings settings) | Turns the timer on or off when the server's HasAFKTimer setting changes. |
private void OnDisable() | Unhooks the server start and end events. |
private void PlayerControllerSet(Player player, PlayerController playerController) | Listens to the new controller's movement and tool hits and restarts the timer; stops it if the controller is gone. |
private void PlayerJoined(Player player) | Listens for the player's controller being set. |
private void PlayerLeft(Player player) | Stops the player's timer. |
private void PositionChanged(PlayerController player, Vector3 oldPosition, Vector3 newPosition, LocomotionFunction function) | Restarts the player's timer when they move. |
private void ResetTimeout(Player player) | Stops and restarts the player's timeout coroutine. |
private void ResetWithHit(ImpactHitWithTool hit, ImpactTool tool) | Restarts the wielder's timer when they hit something with a tool. |
private void ServerEnded() | Stops every player's timer. |
private void ServerStarted() | Reads the AFK setting, listens for setting changes and applies it. |
private void Start() | Hooks the server start and end events. |
private void StopTimeout(Player player) | Stops and removes the player's timeout coroutine. |
private void UpdateSettings() | When on, hooks joins and leaves and sets up current players; when off, unhooks and stops every timer. |
private IEnumerator WaitForTimeout(Player player) (iterator) | Waits timerInSeconds, warns the player, waits gracePeriod, says they're disconnected, then kicks after 5 seconds. The warning wrongly quotes timerInSeconds. |