Settings
Docs/Settings

Settings

A per-player settings hub, built from Paper dialogs, where players toggle features, change options and open filters, grouped into categories, with every toggle saved between sessions.

Requirements

  • Paper or Folia 1.21.7+
  • Java 21
  • A valid license key

No other plugins are required. Most settings only appear when the plugin that owns them is installed, see Integrations.

Installation

  1. Drop the jar into plugins/.
  2. Start the server once to generate the config files.
  3. Put your license key in config.yml under license-key.
  4. Restart the server.

Commands

Command Description Permission
/settings Open the settings hub. settings.open
/settings <key> Change one setting without opening the hub, or open one category. <key> is a setting id or a category id from gui/settings.yml. Only toggle, enum and command settings can be changed this way. settings.open
/settings reload Reload config.yml and gui/settings.yml. settings.reload
/settings debug Toggle debug logging. settings.reload
/settings admin Open the admin dialog. settings.admin
/settings admin color <&#RRGGBB> Change the accent color. settings.admin

/settings, /settings <key> and /settings admin are player-only. reload and debug also work from console. Without the permission a command does nothing and sends no message.

Settings that belong to another plugin are linked to that plugin's command (for example /togglechat). When a player types that command, Settings notices it and updates the saved state, and the command itself still runs.

Permissions

Permission Default Allows
settings.open op Opening the hub and changing settings.
settings.reload op /settings reload and /settings debug.
settings.admin op /settings admin, its sub-command, and the Admin Panel button in the hub.

The permission nodes themselves can be renamed under permissions in config.yml.

Configuration

Files generated in plugins/Settings/:

File Purpose
config.yml License key, accent color and palette, storage backend and connection details, timing, on/off labels, permission nodes.
gui/settings.yml Dialog text and layout, categories and the list of settings.

Settings sends no chat messages and has no messages.yml; every click re-opens the dialog with the new state. When you update from an older version, database.yml, messages/settings.yml and gui/admin.yml are retired and your storage settings are moved into config.yml.

config.yml

Key Default What it does
license-key "" Your license key.
debug false Verbose console logging.
accent-color &#00D4FF Hex accent used in the dialogs. Use {accent} in gui/settings.yml.
colors.* Shared palette: success, error, warning, muted, separator, info, white. Use them as {success}, {error} and so on in gui/settings.yml.
storage-backend sqlite sqlite, mysql or redis. Needs a restart.
sqlite.file data/toggles.db SQLite file, relative to the plugin folder.
mysql.host / port / database / username / password / pool-size localhost / 3306 / settings / root / empty / 2 MySQL or MariaDB connection.
redis.host / port / password / database / timeout-seconds localhost / 6379 / empty / 0 / 5 Redis connection.
settings.storage-flush-interval-seconds 30 How often changed player settings are written to the database.
settings.refresh-delay-ticks 4 Ticks to wait after a click before reading the real state of a setting owned by another plugin.
settings.status-on-values on, true, yes, enabled, enable, shown, visible, show Placeholder results (colors ignored, any case) that read as on.
settings.status-off-values off, false, no, disabled, disable, hidden, hide Placeholder results that read as off.
toggle.enabled-label {success}&lOn Text shown when a setting is on.
toggle.disabled-label {error}&lOff Text shown when a setting is off.
permissions.open / reload / admin settings.open / settings.reload / settings.admin Permission nodes checked by each command.

Use MySQL or Redis to share settings across several servers.

gui/settings.yml

The hub shows one button per category. A category opens a dialog with one button per setting, written as Icon Label: Value. Categories and settings appear in the order they are listed in the file. Add, remove and reorder them without touching code, then run /settings reload.

Top-level sections:

Key What it does
dialog.button-width Width of the buttons.
dialog.lifetime-seconds Seconds the buttons in an open dialog keep working. Default 600.
dialog.hub.* Hub title, body text, columns and the Admin Panel button label and tooltip.
dialog.setting-button, category-button, link-button and other templates How each button is written. Tokens: {icon}, {label}, {value}, {color}.
dialog.locked-* Text for settings shown as locked.
dialog.filter.* The Auto-Sell category dialog.
dialog.admin.* The admin dialog.
categories.<id> The categories.
settings.<id> The settings.

Fields of each categories.<id>:

Field What it does
label, icon, color Button text, glyph and color on the hub.
description One line shown as the dialog title and tooltip.
columns Button columns inside the category dialog.
link friends: the button opens the SPUtils friends dialog instead of a category dialog.
permission Optional permission needed to see the category.
master Adds an on/off button for the whole category (label, icon, description, group). Needs SPUtils. Shows On, Off or Mixed.

A category is hidden when none of its settings is available to the player.

Fields of each settings.<id>:

Field What it does
category Category id the setting belongs to.
label, icon, description Button text, glyph and tooltip.
type toggle, enum, command or dialog-link.
backend Where the state lives: sputils, command or own.
default State for players who have not changed it yet (own and command toggles). Admins can change it from the admin dialog.
enabled false hides the setting without deleting it.
permission Optional permission needed to see it.
show-locked When the hook plugin is enabled but the player cannot use the setting, show it as locked with an upgrade message instead of hiding it.

Backends:

  • own: Settings stores the toggle itself. The id is the key saved in the database, so do not rename a live id.
  • sputils: the preference is stored by SPUtils. Set pref to the SPUtils preference key. For enum settings, values overrides the allowed values and value-labels sets a label per value. editor: pickup-filter adds an Edit button that opens the SPUtils pickup filter editor. The setting is hidden when SPUtils, the preference or its module is missing.
  • command: another plugin owns the setting. Set command (no slash) to run on click; typing it by hand also updates the saved state. hook names a plugin that must be enabled, otherwise the setting is hidden. require-command: true also hides it when the command is not registered or the player may not use it. To show the real state, set placeholder (a PlaceholderAPI placeholder whose result is matched against settings.status-on-values and status-off-values) or state-method (a public boolean method taking a UUID on the hook plugin). invert: true flips a reported state that means the opposite.

A command setting has no state and only runs its command when clicked. A dialog-link setting opens another dialog instead of changing a value. Set link to autosell-filter, friends, pickup-filter or a category id. autosell-filter lists the Sell categories from filter-categories (id, label, icon for each), with Enable All and Disable All buttons.

Integrations

Plugin Effect
SPUtils Owns the sputils preferences (payments, death messages, announcements, join messages, pickup filter and others), the friends dialog and the notification master toggle. Without it these settings, the Friends category and the master toggle are hidden.
Sell Adds the Auto-Sell toggle and the Auto-Sell Categories dialog.
TAB Adds the Server Scoreboard and Boss Bar toggles.
ToggleMobSpawn Adds the Mob Spawning toggle.
PlaceholderAPI Lets Settings read the real state of settings owned by other plugins, through placeholder.

The default gui/settings.yml also links the chat toggles (/togglechat, /togglemsg, /chatping) and the teleport toggles (/tpatoggle, /tpaheretoggle, /tpauto, /tpaguitoggle). A setting stays hidden until its command exists and the player may use it.

Developer API

Settings has no public developer API and fires no events.

FAQ

Does toggling a setting grant the feature? No. Settings stores each player's on/off choice (or hands it to the owning plugin) and shows it in the dialog. It does not add the feature itself. For settings linked to another plugin's command, Settings runs that command on click and the other plugin does the work.

A setting I expect is missing. Settings are hidden when their hook plugin is not enabled, their command is not registered, or the player lacks the command or permission. SPUtils settings are hidden when SPUtils or that preference is missing.

Where is player data stored? In the backend set by storage-backend in config.yml. SQLite needs no setup. Settings owned by SPUtils are stored by SPUtils.

My new entry does not show up. Check its category id exists, enabled is not false, and its hook, command and permission requirements are met. Then run /settings reload.

How do I change the colors? Set accent-color and the colors palette in config.yml, or use /settings admin color &#RRGGBB for the accent. Each category also has its own color in gui/settings.yml.