Hooks
Hooks provided by the Auto Restarter module for managing automatic server restarts.
Overview
The Auto Restarter module provides automated server restart functionality with scheduled maintenance cycles and player notification systems. It displays countdown timers to give players advance warning of impending restarts, allowing them to save progress and prepare for the map change. The module includes configurable restart intervals, emergency restart capabilities, and comprehensive hook support for integrating with other systems that need to respond to server restart events.
AutoRestart
đ Purpose
Called when the server is about to restart automatically.
â° When Called
Immediately before the server executes the restart command.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
timestamp |
number | The current Unix timestamp when restart is triggered |
âŠī¸ Returns
nil
đ Realm
Server
AutoRestartCountdown
đ Purpose
Called during the countdown period before an automatic restart (within 25% of the restart interval).
â° When Called
Every second when the remaining time is within 25% of the restart interval.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
remaining |
number | The remaining seconds until restart |
âŠī¸ Returns
nil
đ Realm
Server
AutoRestartScheduled
đ Purpose
Called when a new automatic restart is scheduled.
â° When Called
When the restart timer is initialized or when a new restart time is calculated.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
nextRestart |
number | Unix timestamp of the next scheduled restart |
âŠī¸ Returns
nil
đ Realm
Server
AutoRestartStarted
đ Purpose
Called when the automatic restart process has begun.
â° When Called
After AutoRestart is called, just before the map change command is executed.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
mapName |
string | The name of the map that will be loaded |
âŠī¸ Returns
nil
đ Realm
Server