UltimateChristmas 4.0 Wiki

UltimateChristmas / Module system

Module system

Every feature is an independent module with its own config file and its own lifecycle. You decide what runs — live, in game, without a restart — and the plugin remembers your choice.

Managing modules

/christmas module list              what exists and what is running
/christmas module disable <id>      stop one feature now, and keep it off
/christmas module enable <id>       start it again
/christmas module restart <id>      fresh listeners and tasks
/christmas module reload <id>       re-read only that module's config
/christmas reload                   re-read every config (nothing restarts)

Permission: ultimatechristmas.admin.modules (/christmas reload needs .admin.reload).

Disabling a module removes its commands, listeners and tasks on the spot. The choice is recorded in config.yml under modules.disabled, so it stays off after a restart. You can also edit that list by hand before first start.

reload vs restart

reload re-reads the module's config file and applies what can be applied live. A few settings create tasks at startup and need a restart instead — each config file says so at the top when it applies. Known cases:

Module ids and config files

Each module reads plugins/UltimateChristmas/modules/<id>.yml:

IdConfig fileDocumentation
economymodules/economy.ymlShard economy
shopmodules/shop.ymlShard shop
adventmodules/advent.ymlAdvent calendar
santamodules/santa.ymlSanta NPC
bossesmodules/bosses.ymlBosses & models
presentsmodules/presents.ymlHidden presents
questsmodules/quests.ymlQuests
passmodules/pass.ymlFestive pass
cosmeticsmodules/cosmetics.ymlCosmetics
treemodules/tree.ymlCommunity tree
secretsantamodules/secretsanta.ymlSecret Santa
snowballmodules/snowball.ymlSnowballs
feastsmodules/feasts.ymlFeasts
musicmodules/music.ymlMusic & carols
snowmodules/snow.ymlSnow
ambiencemodules/ambience.ymlAmbience
countdownmodules/countdown.ymlCountdown
leaderboardmodules/leaderboards.ymlLeaderboards
adminmodules/admin.ymlBelow
platformconfig.ymlInstallation

The admin module

# modules/admin.yml
apply-disabled-on-start: true   # re-apply modules.disabled once the server is up
expose-architecture: true       # allow /christmas architecture exports

/christmas architecture [markdown|json|mermaid|graphviz] exports the live module dependency graph to a file — handy for seeing how the pieces connect.