Skip to main content

Configuration

The configuration file for Nexal Restarts. Located at plugins/Nexal Restarts/config.yml.

config.yml
# Nexal Restarts Configuration
# Scheduled restart manager with player warnings and graceful shutdown

# =============================================================================
# SCHEDULE SETTINGS
# =============================================================================
schedule:
# Enable/disable automatic scheduled restarts
enabled: true

# Timezone for scheduling restarts
# All cron times will be interpreted in this timezone
# Find your timezone here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Common examples:
# "Europe/Athens" - Greece (UTC+2/+3)
# "Europe/London" - UK (UTC+0/+1)
# "Europe/Paris" - France/Germany (UTC+1/+2)
# "America/New_York" - US Eastern (UTC-5/-4)
# "America/Los_Angeles" - US Pacific (UTC-8/-7)
# "Asia/Tokyo" - Japan (UTC+9)
# "Australia/Sydney" - Australia Eastern (UTC+10/+11)
# "UTC" - Coordinated Universal Time
timezone: "Europe/Athens"

# Cron expression for restart schedule
# Format: minute hour day-of-month month day-of-week
# Times are interpreted in the timezone configured above
# Examples:
# "0 */6 * * *" - Every 6 hours (midnight, 6am, noon, 6pm)
# "0 0,12 * * *" - Twice daily at midnight and noon
# "0 4 * * *" - Daily at 4:00 AM
# "0 3 * * 0" - Every Sunday at 3:00 AM
# "30 */4 * * *" - Every 4 hours at :30 (12:30, 4:30, 8:30, etc.)
cron: "0 */6 * * *"

# =============================================================================
# WARNING INTERVALS
# =============================================================================
# List of seconds before restart to send warnings
# Warnings will be sent at each interval if time permits
# Each interval uses its own entry under "warnings" in messages.yml (e.g. warnings.600).
# An interval without one (e.g. 120) uses the "warnings.default" message, so any value works.
warnings:
- 1800 # 30 minutes
- 600 # 10 minutes
- 300 # 5 minutes
- 60 # 1 minute
- 30 # 30 seconds

# Final countdown settings (last 10 seconds)
final-countdown:
# Enable the live actionbar countdown and titles during the final 10 seconds.
# When off, the restart still happens on time, just without the countdown.
enabled: true
# Seconds to show title flash (in addition to actionbar)
title-at:
- 10
- 5
- 4
- 3
- 2
- 1

# =============================================================================
# NOTIFICATION SETTINGS
# =============================================================================
notifications:
# Enable chat messages
chat: true
# Enable title/subtitle display
title: true
# Enable actionbar messages
actionbar: true
# Enable sound effects
sound: true

# =============================================================================
# GRACEFUL SHUTDOWN SETTINGS
# =============================================================================
shutdown:
# Kick all players before server stops
kick-players: true

# Commands to execute before restart (in order)
# Available placeholders for per-player commands: %player%
# Available placeholders for per-world commands: %world%
commands:
# Commands run once globally
global:
- "save-all"

# Commands run for each world
# Placeholder: %world% = world name
per-world: []
# Example:
# - "say Saving world %world%..."

# Commands run for each online player
# Placeholder: %player% = player name
per-player: []
# Example:
# - "eco give %player% 100"
# - "mail send %player% Server restarted! Here's 100 coins."

# =============================================================================
# TIME FORMAT
# =============================================================================
# Format for displaying time in messages and placeholders
# Placeholders: %hours%, %minutes%, %seconds%
# If seconds/minutes are 0, that part is automatically removed
time-format:
hours: "%hours%h %minutes%m"
minutes: "%minutes%m %seconds%s"
seconds: "%seconds%s"

# =============================================================================
# PROXY SYNC SETTINGS
# =============================================================================
# Synchronize restart schedules across multiple servers via BungeeCord/Velocity
# Messages travel through the proxy's BungeeCord channel. On Velocity, keep
# "bungee-plugin-message-channel" enabled in velocity.toml (the default).
# Plugin messages travel through players: the sending server needs a player online,
# and only servers with a player online receive the message.
proxy-sync:
# Enable proxy synchronization
enabled: false

# Unique server name (used to identify this server in sync messages)
# Should be different for each server in your network
server-name: "server1"

# Shared secret that signs every sync message. Use the same long random value on every
# server. Messages signed with another secret are ignored, so players cannot fake them.
# Proxy sync stays off while this is empty.
secret: ""

# Exempt this server from receiving sync messages from other servers
# When true, this server can still SEND syncs but won't receive/apply them
# Useful for a "master" server that controls the schedule
exempt: false

# Fine-grained control over what sync messages to receive
# These only apply if exempt is false
receive:
# Accept schedule/cron sync from other servers
schedule: true
# Accept restart commands from other servers
restart: true
# Accept cancel commands from other servers
cancel: true

# Automatically sync schedule to all servers when config is reloaded
auto-sync-on-reload: false

Configuration Options​

Below is a reference of the main configuration sections:

schedule​

Nexal Restarts Configuration Scheduled restart manager with player warnings and graceful shutdown

============================================================================= SCHEDULE SETTINGS

warnings​

============================================================================= WARNING INTERVALS

List of seconds before restart to send warnings Warnings will be sent at each interval if time permits Each interval uses its own entry under "warnings" in messages.yml (e.g. warnings.600). An interval without one (e.g. 120) uses the "warnings.default" message, so any value works.

final-countdown​

Final countdown settings (last 10 seconds)

notifications​

============================================================================= NOTIFICATION SETTINGS

shutdown​

============================================================================= GRACEFUL SHUTDOWN SETTINGS

time-format​

proxy-sync​

============================================================================= PROXY SYNC SETTINGS

Synchronize restart schedules across multiple servers via BungeeCord/Velocity Messages travel through the proxy's BungeeCord channel. On Velocity, keep "bungee-plugin-message-channel" enabled in velocity.toml (the default). Plugin messages travel through players: the sending server needs a player online, and only servers with a player online receive the message.