-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration and Versioning
This is the most important page if you're updating PlainBase or maintaining a config over multiple versions. Read this before reporting a config-related bug.
PlainBase splits its configuration into a main file and one file per module:
-
plugins/PlainBase/config.yml— only lists which modules are enabled (modules: <name>: true/false). It has no feature settings itself. -
plugins/PlainBase/modules/<name>.yml— one file per module (spawn.yml,teleport.yml,messages.yml,joinitems.yml,vanish.yml,menu.yml,moderation.yml), each holding that module's settings.
Module files are only created on disk once the module has been loaded at least once (i.e. after you enable it and reload/restart, or on first successful startup for modules already true in code).
Two ways:
- Edit
config.yml→modules.<name>: true, then/plainbase reloador restart. - Live-toggle with
/plainbase toggle <module>(requiresplainbase.admin) — flips the value inconfig.yml, saves it, and reloads modules immediately. No restart needed either way.
Note on defaults: in the shipped
config.ymlevery module defaults tofalse(opt-in). If a module entry is missing entirely from yourconfig.yml(e.g. after a manual edit), the plugin's internal code fallback istruefor that lookup — so always checkconfig.ymlexplicitly rather than assuming a module is off just because you don't remember enabling it.
Every config file PlainBase ships — config.yml and every file in modules/ — ends with:
# DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
version: X.YThis is not a cosmetic comment. On every plugin startup:
- PlainBase's code keeps a hardcoded map of the latest known version for every config file (
config.yml,spawn.yml,teleport.yml, etc.), one entry per file, bundled with that specific plugin build. - It reads the
version:value at the bottom of your file on disk. - If your version is lower than the latest known version, PlainBase logs a warning to the console:
!!! OUTDATED CONFIG: modules/spawn.yml !!! Your version: 1.0 | Required: 1.2 Please check GitHub for the latest version and update your file. -
Every time an OP joins the server, they additionally get an in-game warning message (red, bold
[PlainBase]prefix) for every outdated file — main config and every module file are checked independently.
- It does not automatically merge, migrate or rewrite your config file.
- It does not add new keys to your existing file for you.
- It does not block the module from loading just because the version is old — the module still runs with whatever values it can read (missing keys fall back to safe in-code defaults, but new features tied to new keys simply won't be configurable until you update the file).
- Get the corresponding default file for the version you just installed — links below always point at the current
mainbranch (i.e. whatever the latest release ships). - Manually port over your custom values (item names, locations, messages, cooldowns, etc.) into the new structure, then copy the new
version:line as-is. -
/plainbase reload— the warning disappears once your on-disk version matches the required one.
🛠 A config updater/migration tool is in development — the plan is for a future PlainBase version to diff your on-disk config against the current default and let you merge/apply the missing keys automatically (
/plainbase update-configor similar), instead of manual copy-pasting. Not available yet; this page will be updated once it ships.
| File | Link |
|---|---|
config.yml |
View on GitHub |
modules/spawn.yml |
View on GitHub |
modules/teleport.yml |
View on GitHub |
modules/messages.yml |
View on GitHub |
modules/joinitems.yml |
View on GitHub |
modules/vanish.yml |
View on GitHub |
modules/menu.yml |
View on GitHub |
modules/moderation.yml |
View on GitHub |
Click "Raw" on any of those pages to get a direct download link for that file. Each module page below also links directly to its own config file.
A config file's version number only increases when its structure changes (new keys, removed keys, renamed keys) — not for every release. A module can go through several PlainBase releases without its config version changing at all if nothing about its config structure changed.
| File | Latest Version |
|---|---|
config.yml |
1.6 |
modules/spawn.yml |
1.2 |
modules/teleport.yml |
1.0 |
modules/messages.yml |
1.0 |
modules/joinitems.yml |
1.1 |
modules/vanish.yml |
1.1 |
modules/menu.yml |
1.0 |
modules/moderation.yml |
2.0 |
These numbers change over time as PlainBase evolves. Always trust the in-game/console warning over this table — it always reflects the exact jar you're running.
/plainbase reload, /plainbase toggle <module> and plugin startup all funnel through the same internal reload:
- Stop all currently active modules (cancel scheduled broadcasts, unregister listeners).
- Re-read every module config file from disk.
- Re-run the setup for every module that is currently enabled.
This means editing a modules/*.yml file and running /plainbase reload is always safe and instant — no restart required for config changes, ever.
Every text field you can configure (messages, item names, lore, menu titles, ban/kick screens, broadcasts) uses MiniMessage syntax, e.g. <red>, <green>, <gradient:gold:yellow>...</gradient>, <bold>. Placeholders like %player% are simple string substitutions done before MiniMessage parsing; PlaceholderAPI placeholders (%plainbase_*%, %player_name%, ...) are resolved separately if PlaceholderAPI is installed — see PlaceholderAPI.