Database
1 Database
KingdomCraft by default saves all data in the database.h2.mv.db file.
Make sure to backup your server regularly to avoid losing data in case of a crash.
1.1 Remove player data
You can clear and reset all player data with the following command.
/k playerdata clear | kingdom.playerdata.clear |
2 Database engines
You can choose to use a dedicated database like MySQL or PostgreSQL. This is very advanced and is only recommended if you know what you are doing.
NB. You cannot use the same database for both KingdomCraft Starter and Premium. This requires 2 separate databases.
2.1 MySQL
You can add more parameters to the url if necessary. More info.
database:
driver: 'com.mysql.jdbc.Driver'
url: 'jdbc:mysql://{host}:{port}/{database}'
username: 'user'
password: 'pass'2.2 PostgreSQL
You can add more parameters to the url if necessary. More info.
database:
driver: 'org.postgresql.Driver'
url: 'jdbc:postgresql://{host}:{port}/{database}'
username: 'user'
password: 'pass'2.3 H2
Just save all data in the plugin directory. (default)
database:
driver: 'org.h2.Driver'
url: 'jdbc:h2:file:./plugins/KingdomCraft/database.h2'
username: 'user'
password: ''