-
Notifications
You must be signed in to change notification settings - Fork 148
Player Data Storage
By default, Magic will store player data in plugins/Magic/data/players.
Player data contains the classes and spells players have unlocked, SP earned, various stats, stored wands, undo queues (for engineering magic) and a host of other information. It is important to keep these backed up and safe!
If you would prefer to store your player data in a database, Magic will easily let you do this!
See the default configs here for examples:
player_data_store:
class: SQLite
database: players
All parameters are optional, though you will hopefully need to at least specify user and password.
player_data_store:
class: MySQL
database: magic
host: localhost
port: 3306
user: minecraft
password: somethingsecure
player_data_store:
class: PostresSQL
database: magic
host: localhost
port: 3306
user: minecraft
password: somethingsecure
If you already have player data (this happens as soon as players log in with the plugin installed) and you want to switch data storage, you can do so while easily migrating your data.
It is recommended to turn on a server whitelist during this process, though it may not be necessary.
It is strongly recommended to backup your existing player data before migrating!
In config.yml you would change your existing player_data_store
block to migrate_data_store
, like this:
migrate_data_store:
class: Yaml
folder: data/players
This block has the configuration of where your player data currently resides. The player_data_store
block should contain your new player data configuration.
Once this is set up, you should run the /magic migrate
command to push the migration process through.
- Home
- FAQ
- Support
- Progression
- Spell Points
- Crafting
- Basic Setup
- Customization
- Resource Pack
- Examples
- Messages and Languages
- Vanity Items
- NPCs
- Magic Blocks
- Magic Mobs
- Putting Images on Maps
- Using MySQL or SQLite
- Placeholders
- Skript
- Regions