- Contributors
- btk5h (Bryan Terce), FranKusmiruk, Govindas, TPGamesNL
- Supported Minecraft Versions
- 1.9
- 1.10
- 1.11
- 1.12
- 1.13
- 1.14
- 1.15
- 1.16
- 1.17
- 1.18
- 1.19
Code:
Awesome direct database access for Skript
- Automatic SQL injection protection
- Support for connections to multiple databases
- An amazingly intuitive list variable system for reading query outputs
Documentation/Source - Releases
Quickstart (MySQL example, but you can also use SQLite/MariaDB/PostgreSQL)
Code:
on script load:
set {-sql} to the database "mysql://localhost:3306/mydatabase?user=admin&password=12345&useSSL=false"
Code:
command /dbtest:
trigger:
execute "select * from table" in {-sql} and store the result in {_output::*}
send "First entry in column: %{_output::columnname::1}%"
Code:
command /insertmyprofile:
trigger:
execute "INSERT INTO table (uuid,name,lastjoin) VALUES (%uuid of player%,%name of player%,%rounded unix timestamp of now%) ON DUPLICATE KEY UPDATE name=VALUES(name),lastjoin=VALUES(lastjoin)" in {-sql}
Support
You can receive support by creating an issue at the git repository, alternatively you can receive live chat support in my Matrix chatroom.