Configuration
Configuration Files
Section titled “Configuration Files”| File | Purpose |
|---|---|
config.yml |
Main behavior and schedule configuration. |
lang/en_us.yml |
Bundled English player/admin messages. |
lang/en_id.yml |
Bundled Indonesian player/admin messages. |
Runtime files are created under plugins/MF-AutoRestart/.
config.yml
Section titled “config.yml”Location:
plugins/MF-AutoRestart/config.ymlDefault Configuration
Section titled “Default Configuration”# MF-AutoRestart configuration# Repository documentation and source comments are intentionally English.
settings: # Player-facing language file under plugins/MF-AutoRestart/lang/. language: en_us
# Timezone used for schedules. IANA IDs are recommended. # Supported shortcuts: WIB, WITA, WIT, GMT+7, UTC. timezone: "Asia/Jakarta"
# Proxy server name used by the BungeeCord-compatible Connect message. lobby-server: "lobby"
# Seconds to wait after proxy redirection before kicking players that remain. redirection-grace-period: 3
# Schedule time means countdown START time, not final process restart time.# Supported formats:# DAILY:HH:mm# WEEKLY:DAY:HH:mmschedules: - "DAILY:07:00" # - "WEEKLY:SUNDAY:12:00"
# Countdown duration used by automatic schedules and by /ar start without a value.# Minimum: 5 seconds.default-countdown: 300
# Warning marks in seconds remaining.warning-intervals: - 300 - 180 - 120 - 60 - 30 - 10 - 5 - 4 - 3 - 2 - 1
# Console commands executed at exact countdown marks.# Commands must not start with '/'.# Available placeholder: %seconds%# A failed command is logged and does not abort the restart sequence.pre-restart-commands: 300: - "save-all" 60: - "broadcast [MF-AutoRestart] Server restart in %seconds% seconds. Please prepare." 30: - "broadcast [MF-AutoRestart] Server restart in %seconds% seconds." 0: - "broadcast [MF-AutoRestart] Restarting server now. Redirecting all players."Configuration Reference
Section titled “Configuration Reference”| Option | Type | Shipped Default | Reload | Description |
|---|---|---|---|---|
settings.language |
String | en_us |
Yes | Active language file name without .yml. Safe locale names use letters, digits, _, or -. |
settings.timezone |
String | Asia/Jakarta |
Yes | Timezone used by static and dynamic schedules. |
settings.lobby-server |
String | lobby |
Yes | Target server name sent in the BungeeCord-compatible Connect message. Must not be blank. |
settings.redirection-grace-period |
Integer | 3 |
Yes | Seconds between proxy redirect attempt and fallback kick/restart request. Minimum 1. |
schedules |
List of strings | DAILY:07:00 |
Yes | Static countdown start schedules. |
default-countdown |
Integer | 300 |
Yes | Countdown seconds used by automatic schedules and /ar start without an explicit duration. Minimum 5. |
warning-intervals |
List of integers | See file | Yes | Positive countdown marks that trigger chat/action-bar/title warnings. Duplicate values are collapsed and runtime order is descending. |
pre-restart-commands |
Section of string lists | See file | Yes | Console commands executed at exact countdown marks. Keys may be 0 or greater. Commands must not start with /. |
Timezone Values
Section titled “Timezone Values”Any timezone accepted by Java ZoneId.of(...) can be used. The source also provides these shortcuts:
| Shortcut | Resolved Zone |
|---|---|
WIB |
Asia/Jakarta |
WITA |
Asia/Makassar |
WIT |
Asia/Jayapura |
GMT+7 |
GMT+07:00 |
UTC |
UTC |
An invalid timezone causes config preparation to fail instead of silently replacing the active runtime configuration.
Schedule Validation
Section titled “Schedule Validation”Static entries must match exactly:
DAILY:HH:mmWEEKLY:DAY:HH:mmHours must be 0-23; minutes must be 0-59; weekly day names use English MONDAY through SUNDAY.
Pre-Restart Commands
Section titled “Pre-Restart Commands”Commands run as the console sender. %seconds% is replaced with the current remaining seconds.
A configured command that returns false or throws a runtime command failure is logged and skipped; it does not abort the restart sequence.
Localization
Section titled “Localization”MF-AutoRestart bundles en_us and en_id. The plugin ensures both files exist under:
plugins/MF-AutoRestart/lang/If a selected locale file exists, its string values are merged over the bundled fallback messages. Missing keys therefore use bundled fallback values. A custom safe locale name can be selected when its corresponding file already exists.
Message rendering supports:
- legacy ampersand colors such as
&e; - legacy HEX such as
&#FFAA00; - MiniMessage tags and gradients.
Legacy formatting takes precedence when a message contains legacy color syntax. Do not mix legacy & formatting and MiniMessage tags in the same message if you expect the MiniMessage tags to be parsed.
Dynamic message replacement values are inserted as text rather than treated as formatting markup.
Applying Configuration Changes
Section titled “Applying Configuration Changes”Use:
/autorestart reloadReload preparation runs off the gameplay thread for file/database I/O. The existing runtime state remains active if preparation fails.
| Area | Reload Supported | Server Restart Required |
|---|---|---|
config.yml |
Yes | No |
| Selected language/messages | Yes | No |
| Dynamic schedule snapshot | Yes | No |
| SQLite journal/backend policy | No user setting exists | N/A |
The plugin-specific reload command is separate from Paper/Bukkit server-wide /reload, which is not documented here as a supported lifecycle operation.