Player data
Values a menu remembers for each player: [DATA] lines, data() and the placeholder.
A menu can remember things for each player across restarts: a reward claimed, a choice made, a counter. Values are stored in the plugin's table exyliascreens_player_data, in the database that
database.yml points to (H2 by default), and read before the player joins.
| Line | Does |
|---|---|
[DATA] set <key> <value> | Sets it. Placeholders are allowed: [DATA] set last_warp %warp%. |
[DATA] add <key> [n], [DATA] take <key> [n] | Adds or takes a number (1 when left out). A missing value counts as 0. |
[DATA] toggle <key> | Flips a flag between true and false. |
[DATA] remove <key> | Forgets it. |
The line works anywhere an interaction line does: screens, chest and 3D clicks, holograms and NPCs.
Reading it back
data('key')inif,requireand${...};data('key', 'default')for a default other than 0.%exyliascreens_data_<key>%anywhere placeholders work. It is empty when the player has no value.
Keys are letters, digits and _ . -, up to 64 characters; values are up to 256 characters. A malformed line is reported in the debug log and does nothing.
welcome_gift:
slot: 13
priority: 1
if: "not data('welcome_gift')" # the claimed version of the slot shows afterwards
click: ["[DATA] set welcome_gift true", "[MONEY] give 100"]Resetting
The values are progress data owned by the player: /exylialib resetplayer and ExyliaLib's wipes clear them.
Something missing on this page? Tell us on Discord