Lifecycle

1command
1file
2min read
Sheet 27 of 31 · Server Admin

Filesleaderboards.yml

Fileleaderboards.ymlCommand/zadmin reloadWhat the plugin does when the server starts, when it stops, and when players come and go. Useful when something looks wrong after a restart.

Startup

StepWhat happens
ConfigsAll ten config files load, and the updater adds any new keys.
ArenasEvery file in arenas/ is loaded.
StatsThe SQLite or MySQL connection opens. If it fails, stats are switched off and the rest carries on.
ServicesGameplay, UI and creator services start. The action bar timer begins.
Listeners and commands/zombies and /zadmin are registered.
PlaceholderAPIThe expansion registers if PlaceholderAPI is installed.
Lobby NPCSpawns when lobby-npc.enabled is true.
Leaderboard hologramsLoaded from leaderboards.yml and drawn.
TimersProfile saving every auto-save-interval seconds and leaderboard refresh every leaderboards.refresh-seconds.

If any step before this throws, the plugin logs the error and disables itself.

Shutdown

StepWhat happens
Creator ModeEveryone in Creator Mode is taken out and gets their inventory back.
Leaderboard hologramsRemoved. They come back on the next start.
StatsEvery changed profile is saved, waiting for the writes to finish, then the connection closes.
BossesBoss bars and ability timers are cleared.
ArenasRunning matches are ended and players restored.
Corpses, holograms, highlightsRemoved from the world.
Arena filesEvery arena is saved.

Players joining and leaving the server

EventWhat happens
JoinThe player's stats profile loads in the background.
QuitCreator Mode ends, wand selections and previews clear, the player leaves their arena (restoring their inventory) and their profile is saved if it changed.

A player who disconnects mid-match counts as leaving: their stats for that game are recorded and their inventory is restored before they go.

Reload

Command/zadmin reload/zadmin reload reloads the config files and redraws the leaderboard holograms. Arenas, the database and running matches are left as they are. See Configuration for what needs a restart.

Loading the index

Enter openUp Down moveEsc close