Understand the database
The thirty-eight tables, which module owns each, what they hold, how the lib's wipe reads them, and the schema quirks worth knowing.
Every module that stores anything opens its own tables, and a module that is off creates none. All of
them go through one connection, configured in database.yml (ExyliaLib's file; the engine and the Redis
block are described in the library's database page).
Tables are created from the record definitions with CREATE TABLE IF NOT EXISTS, the first time each
repository is opened. There is no schema file to apply and no migration to run.
Every table declares what it holds (@Table(data = …)) and which column is the player, so
/exylialib wipe and /exylialib resetplayer cover them without any command of this plugin's own. The
Kind column is that declaration (account, progress, history, world, setup or cache), which
is what the lib's wipe uses to decide what to clear.
Supply drops, power-ups, loot chests, regen zones, duel rooms, bounties, crates, the shop, the market,
vaults, graves, protections, rewards, votes, mines, AFK zones and the economy are no longer created by this
plugin. Their old sc_* and exylia_* tables stay in the database untouched; the plugins that took them
over read them, so do not drop them. See each plugin's own documentation, such as
ExyliaEconomy, ExyliaMarket and
ExyliaCrates.
Movement#
| Table | Kind | Key | Holds |
|---|---|---|---|
spawn_data | setup | id | The spawn location. One row |
sc_spawn_seen | progress | the player UUID | That the player has joined some server of the network, and how many times. This is what "first join" asks, so a hop to another server is not treated as a new player |
homes | progress | id = a UUID | The owner (indexed), name, location and icon |
sc_warps | setup | id | Display name, enabled, cost, permission, icon, location |
sc_warp_cooldowns | cache | <playerUuid>:<warpId> | When the player last used that warp |
tpa_settings | account | playeruuid | Whether they accept requests, auto-accept and confirm |
rtp_cooldowns | cache | id | Player (indexed), world, when it was used |
sc_back | cache | the player UUID | Where they last left from, and when |
survival_portals | setup | id | The region, the destination and the command list (only with the portals module on) |
sc_jumpads | setup | id | Server, power, direction, glide, and the block locations (only with jumpads on) |
/back and the warp cooldowns are rows rather than memory because a warp can put the player on another
server, and the server they arrive on has to know both. survival_portals is the one table with the
survival_ prefix rather than sc_.
Statistics#
| Table | Kind | Key | Holds |
|---|---|---|---|
player_stats | progress | playeruuid | Name, kills, deaths, best kill streak |
stat_cache | cache | <uuid>:<statId> | One cached stat value per player, for the leaderboards |
sc_stat_counters | progress | <uuid>:<key> | Every counter a module keeps: player name, counter key, amount |
player_stats carries three descending indexes — on kills, deaths and best streak — so a leaderboard is
a bounded read. sc_stat_counters is what a COUNTER stat in stats.yml, a mission and a season all
read, so counting something new never needs a table of its own.
Progression#
| Table | Kind | Key | Holds |
|---|---|---|---|
rankup_data | progress | playeruuid | Current rank, completed ranks, prestige level |
farming_data | progress | playeruuid | Per-category counts |
sc_farming_claims | progress | <playerUuid>:<category>:<milestone> | One farming milestone of one player: claimed or not, and when |
reclaim_data | progress | playeruuid | What has been claimed once |
sc_reclaim_claims | progress | <playerUuid>:<section> | When the player last reclaimed one section (0 means never, or reset) |
player_join_data | progress | the player UUID | First join, join number, total joins |
sc_scheduled_runs | setup | <server>:<section> or network:<section> | When a scheduled-commands section last ran |
Farming milestones and reclaim sections are a row each, rather than a list inside the player's row, so two servers racing for the same claim cannot pay it twice: of the two conditional writes, only one lands.
Missions, seasons, projects and reputation#
| Table | Kind | Key | Holds |
|---|---|---|---|
sc_missions | progress | <uuid>|<pool>|<period>|<missionId> | One mission a player was dealt: pool, period, mission, the counter value it started from, the target, claimed |
sc_seasons | world | <track>:<period> | The season a track is counting right now, and when it started |
sc_season_results | history | <seasonId>:<position> | A closed season's board: track, period, position, player, score, when it closed |
sc_projects | world | the project id | Whether the project is open, completed or settled, and when |
sc_project_progress | world | composed id (project and material) | How much of one material the project has received |
sc_project_contributions | world | composed id (project and player) | How many items one player gave one project (indexed for the largest-first read) |
sc_project_payouts | world | composed id (project and player) | Whether one contributor of a completed project has been paid |
sc_reputation | progress | the player UUID | Name, positive and negative ratings received |
sc_reputation_pairs | cache | <rater>:<target> | When one player's rating of another last counted |
sc_reputation_tickets | cache | a generated id | One deal a rater may still rate: target, where it happened (trade, market or auctions), when |
Kits, boosters and tools#
| Table | Kind | Key | Holds |
|---|---|---|---|
sc_kits | setup | id | The whole kit: items, commands, cooldown, uses, icon, order, flags |
sc_kit_player_data | progress | <playerId>:<kitId> | Last claim and use count. Player indexed |
sc_boosters | world | id | Owner (empty for a global booster), type, source, multiplier, duration, when it expires (0 while not started), who granted it |
sc_booster_presets | setup | id | A booster ready to hand out: name, icon, type, source, multiplier, duration. Giving one copies it, so editing a preset never changes a booster already given |
sc_item_spawners | setup | id | Server, locations, the interval range and the loot table (only without ExyliaSpawners) |
sc_item_updates | setup | the group name | The item that is replaced and the item it becomes |
Quality of life#
| Table | Kind | Key | Holds |
|---|---|---|---|
player_utils_data | account | playeruuid | Whether flight and night vision are on |
sc_player_settings | account | playeruuid | The preferences the player has turned off |
Modules that store nothing#
death, enchantments, near, optimization and repair. Kill streaks are counted in memory and lost on a restart.
Things worth knowing before you touch a table by hand#
Homes, warps, portals and jump pads store server,world,x,y,z,yaw,pitch, where - means "this server".
That is what makes /home and /warp work across a network. A row naming a server that is not this one
has no local location at all, which is why the API offers a teleport method rather than coordinates. Places
saved under a previous server id are read as this server's.
A season is closed, a reputation ticket is rated, a scheduled run is taken and a project is completed or paid by whichever server manages to delete or move the row first — only one write succeeds, which is what makes each of those happen once across a network. Editing such a row by hand is not a clean-up: it pays nothing, closes nothing, or runs the action twice.
The tables the plugin has had the longest also carry created_at and updated_at; the newer ones carry
only the columns above. Nothing has a unique constraint beyond its primary key.
Sharing across servers#
Point every server at the same database and homes, warps, kits, ranks, statistics, boosters, projects and the rest are shared. Tables with no server column are network-wide by design; tables that do carry one (homes, warps, jump pads, portals) are shared but each row remembers where it was set.
Something missing on this page? Tell us on Discord