Profiles
On this page(3)
Discovery works on any plugin without configuration. profiles.yml is for the cases it cannot
cover alone: forcing a plugin to apply now or at the restart, skipping a plugin, declaring a store
that cannot be found, or telling the database engine which columns hold the player.
The file is written once on first start and never updated afterwards. Entries you add, change or delete stay that way. A malformed entry is skipped with a console warning and the others still load.
Entry keys
| Key | Description |
|---|---|
plugin | Required. The plugin's data folder name under plugins/ |
mode | instant, queued or skip. Forces every store of the plugin to apply now or at the next restart, or leaves the plugin out of every transfer |
storage | Declares a store discovery cannot find: type (mysql, sqlite, h2 or yaml), then the MySQL connection keys or a file |
tables | Hints per table: id-columns (cells holding the UUID), name-columns (cells holding the nick) and rewrite-json-ids (also rewrite the old UUID and nick inside the row's text or JSON values) |
files | Shared files to rewrite when present, relative to the plugin's data folder |
Shipped profiles
- EdTools: rewrites
data/users.ymlin YAML mode and, in MySQL mode, theuserstable keyed byid, including the ids inside its JSON values. - EdPrison: the same storage layer as EdTools. Member UUIDs inside the gangs table's JSON are not rewritten.
profiles.yml
# ============================================================
# SnUserTransfer - transfer profiles
# Seeded once on first start, then NEVER auto-updated: this file is fully
# yours. Each entry under profiles: overrides or extends discovery for ONE
# plugin. A malformed entry is skipped with a console warning; the rest
# still load.
#
# Schema per entry (only plugin: is required):
# plugin: <data folder name under plugins/>
# mode: instant | queued | skip
# Forces every store of that plugin to apply now (instant) or at the
# next restart (queued), or excludes the plugin entirely (skip).
# Without it, each store keeps its risk-based default.
# storage:
# Declares a store discovery cannot find on its own. Same keys and
# defaults as the SnLib convention:
# type: mysql | sqlite | h2 | yaml
# mysql: host (localhost), port (3306), database (lowercased plugin
# folder name), username (root), password (empty), ssl (false)
# sqlite/h2/yaml: file (sqlite defaults to database.db; h2 and yaml
# require it), relative to the plugin's data folder unless absolute
# tables:
# Per-table hints for the database engine:
# - name: <table>
# id-columns: [..] columns whose cells hold the player UUID
# name-columns: [..] columns whose cells hold the player nick
# rewrite-json-ids: true|false
# After a row is re-keyed, also rewrite the old uuid/nick inside
# that row's text/JSON cell values (exact-token rules).
# files:
# Shared data files to rewrite when present:
# - path: <file> relative to the plugin's data folder unless
# absolute; must be .yml/.yaml/.json/.properties/.txt/.csv
# key-format: uuid | nick ADVISORY ONLY (default uuid). It documents
# what the entry keys hold; it does NOT narrow the rewrite. Both
# identity parts are always matched by exact value, so a file whose
# keys are nicks is handled correctly whatever this says.
# ============================================================
# One entry per plugin. Entries you delete, rename or add stay that way.
# sn:extensible
profiles:
# EdTools stores either in YAML or in MySQL; this profile covers both. In
# yaml mode data/users.yml is keyed by player UUID. In mysql mode discovery
# sniffs the connection from EdTools' own config and the users table hint
# below applies to it.
edtools:
# Data folder name under plugins/.
plugin: EdTools
# Shared files rewritten when present (yaml storage mode).
files:
- path: data/users.yml
key-format: uuid
# Hints applied to whatever EdTools database store discovery finds
# (mysql storage mode).
tables:
- name: users
id-columns: [id]
name-columns: []
# users rows embed the player's ids inside JSON values; rewrite them too.
rewrite-json-ids: true
# EdPrison uses the same storage layer as EdTools (same author).
# Known limit: member UUIDs inside the gangs table's JSON blobs are NOT
# rewritten by this version.
edprison:
# Data folder name under plugins/.
plugin: EdPrison
# Shared files rewritten when present (yaml storage mode).
files:
- path: data/users.yml
key-format: uuid
# Hints applied to whatever EdPrison database store discovery finds
# (mysql storage mode).
tables:
- name: users
id-columns: [id]
name-columns: []
# users rows embed the player's ids inside JSON values; rewrite them too.
rewrite-json-ids: true
# Example of a custom third-party profile. Uncomment and adapt.
#myplugin:
# plugin: MyPlugin
# # Everything of MyPlugin waits for the next restart.
# mode: queued
# # MyPlugin's store is not discoverable; declare it explicitly.
# storage:
# type: mysql
# host: localhost
# port: 3306
# database: myplugin
# username: root
# password: ""
# ssl: false
# tables:
# - name: player_data
# id-columns: [uuid]
# name-columns: [last_username]
# rewrite-json-ids: false
# files:
# - path: storage/players.yml
# key-format: nick