Content generated with AI — it may contain mistakes.

ExyliaSandBox/ReferencereferenceUpdated in v1.2.0

Database

The tables ExyliaSandBox adds to your database, their columns, what is kept in memory instead, and how servers share them.

Page 16 of 244 min read

Everything the plugin owns lives in the database: there is no world list, kit file or pad file on disk. The connection, the engine (H2 by default) and sharing between servers are ExyliaLib's; set them up on Database. This page lists only the tables ExyliaSandBox adds.

Before you start#

Nothing to create: the tables are made on first start. Back them up with the rest of your database.

Steps#

Point every server at the same database

Worlds, kits, templates and pads are then the same everywhere.

Choose how worlds are shared

Set worlds-scope in config.yml (see Configuration) and restart.

Check that it works#

Create a world on one server and restart or reload the other: it appears there. Nothing is synchronised live, so a world created on one server is picked up by another when it next reads, and kits are read on join.

Going further#

The tables#

sandbox_worlds: one row per configured world
ColumnTypeNotes
idkeyThe world id as typed
display_nametext
biometextA biome id, minecraft:plains
border_sizeintThe diameter
icontextMaterial name, head string or a serialised item
generation_jsontextThe preset: base height, the layer stack and the feature list
typetextMANAGED or IMPORTED
folder_nametextImported worlds only
settings_jsontextThe difficulty and twelve of the thirteen toggles
created_at, updated_atlong

disable_powder_snow is toggled in the admin screen and read live, but it is not written into settings_json: it goes back to its default on the next load.

sandbox_player_kits: one row per kit
ColumnTypeNotes
idkey<uuid>:<slot>
player_uuidindexed
slotint1-based
name, icontext
contents, armor, offhandtextSerialised item stacks
favoritebooleanAt most one true row per player
created_at, updated_atlong
sandbox_predefined_kits: the admin templates
ColumnTypeNotes
idkeyA slug of the name at creation. Renaming does not change it
name, description, icontext
contents, armor, offhandtext
practice_kittextThe linked PracticeCore kit, if any
created_at, updated_atlong
sandbox_kitroom_categories and sandbox_kitroom_items: the old kit room

These are the old kit-room tables (a category has a display_name, material and priority; an item has a category_id, slot and item_stack). The kit room now lives in ExyliaLib's exylia_kitroom (see Kit room); these two are only read, once, to seed it, and never written again.

sandbox_player_stats
ColumnTypeNotes
uuidkey
kills, deathsintCounted only inside sandbox worlds
playtime_millislongSandbox time, not server time
created_at, updated_atlong

A kill counts when both the killer and the victim are in a sandbox world and they are not the same player. KDR with no deaths is the kill count.

sandbox_tp_regions: the teleport pads
ColumnTypeNotes
idkeyTwelve hex characters
display_nametext
interval_secondsintMinimum five
target_world_idtextEmpty means a random READY world
spread_radiusint
world_nametextThe world the box is in
min_x ... max_zdoubleThe six corners
created_at, updated_atlong
sandbox_settings: the lobby and the kit-creator room

Exactly one row, holding the lobby location and the kit-creator room location. A legacy data.yml in the plugin folder is read once on startup and imported into this row, for locations the database does not already have. The file is never rewritten or deleted.

What is not in the database#

Kept in memory onlyLost on
The kit a player is wearingRestart, or leaving
The /back pointRestart, or a disconnect
Queue membershipRestart, or a disconnect
Pending /tpa requestsTheir timeout, a disconnect, or a restart
The kit-creator sessionA disconnect, which also gives the inventory back
Who is standing on a teleport padRecomputed when the plugin loads

Kits and statistics are cached per player and written back when they disconnect.

Sharing across servers#

The world list and the teleport pads are stored per network group: worlds-scope in config.yml (default follows the network group set in ExyliaLib's config.yml, server gives each server its own, global shares with every server, any other value is a group name), read at startup.

Something missing on this page? Tell us on Discord