Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buyOn this page, you will find every table and column that Phoenix Duels creates in your database.
Phoenix Duels creates its tables automatically on first start, on both SQLite and MySQL. You never need to create them yourself, and you should not edit them by hand while the server is running.
Every table name honours the database.table-prefix option. With an empty prefix the tables are named exactly as below; with a prefix of duels, _duels_player_table becomes duels_duels_player_table.
_duels_player_table - one row per player.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| uniqueId | The player's UUID. Unique. |
| playerName | The player's last known name. |
| cachedInventory | The inventory saved before their current match, used to restore it. |
| cachedPotionEffects | The potion effects saved alongside that inventory. |
| rejectingDuelsRequest | Whether the player has duel requests turned off. |
| lastTimePlayed | JSON map of mode id to timestamp, used for the per-mode cooldown. |
| otherStats | JSON map holding the kill, death, win and loss streaks per match type. |
| metadata | JSON map used by add-ons to store their own values against a player. |
_ranking_score_table - one row per player per mode.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| uniqueId | The player's UUID. |
| playerName | The player's last known name. |
| arenaModeId | The mode this rating belongs to. |
| score | The player's elo rating in that mode. |
_history_records_table - one row per player per finished match.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| uniqueId | The player's UUID. |
| playerName | The player's name at the time of the match. |
| arenaId | The map the match was played on. |
| modeId | The mode that was played. |
| matchType |
ranked, unranked or challenge. |
| kills | Kills this player got in the match. |
| deaths | Deaths this player took in the match. |
| status |
1 for a win, -1 for a loss, 0 for a draw. |
| createdAt | Unix timestamp of when the match ended. |
| replayName | The recorded replay, if one exists. Cleared when the replay expires. |
| arenaInstanceKey | Which arena instance the match ran in, used to play the replay back. |
_match_recaps_table - the snapshot behind the Recap option in match history.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| historyRecordId | The history row this recap belongs to. |
| uniqueId | The player's UUID. |
| cachedInventory | Their inventory at the moment the match ended. |
| cachedArmor | Their armor at that moment. |
| cachedOffhand | Their off-hand item at that moment. |
| cachedPotionEffects | Their active potion effects at that moment. |
| health / maxHealth | Their health and maximum health. |
| foodLevel / saturation | Their hunger and saturation. |
| createdAt | Unix timestamp of when the recap was taken. |
_kit_layouts_table - a player's custom layout for a premade kit.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| uniqueId | The player's UUID. |
| arenaModeId | The mode whose kit this layout is for. |
| slots | The arrangement of the kit's items. |
| trims | The armor trims applied to that layout. |
_virtual_storage_table - the Lost Items storage.
| Column | Description |
|---|---|
| id | Auto-incrementing primary key. |
| uniqueId | The player's UUID. Unique. |
| serializedItems | The items waiting to be claimed. |
These are only created when the matching add-on is installed.
| Table | Created by |
|---|---|
_player_kits_table |
Player Kits. Holds uniqueId, code (the kit slot) and items. |
_eloranks_players_table |
Elo Ranks. Holds uniqueId, currentRank and unlockedRanks. |
_rematchrequeue_players_table |
Rematch & Requeue. Holds uniqueId and autoRequeueEnabled. |
Kills, deaths, wins, losses and draws are not stored as counters anywhere. They are summed live from _history_records_table every time they are needed.
So a player's total ranked kills is a query, not a column lookup:
SELECT SUM(kills) FROM _history_records_table
WHERE uniqueId = ? AND matchType = 'ranked';
This is also why /pduels set kills works the way it does. Since there is no counter to overwrite, it inserts a single corrective record with a modeId of manual-adjustment that makes the sum land on the value you asked for. If you find those rows in the table, that is where they came from.
Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buy