Skip to content

Commit f66ff41

Browse files
authored
Update README.md
1 parent 4a4bde0 commit f66ff41

1 file changed

Lines changed: 45 additions & 6 deletions

File tree

README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,46 @@
1-
# DataManager
21

3-
Simple plugin for PowerNukkit Minecraft Bedrock core, that will help you to create your sql2o connections with ease! (SQLite, MySQL)
4-
<br/>
5-
<br/>
6-
#### PowerNukkit: https://github.com/PowerNukkit/PowerNukkit
7-
#### sql2o: https://github.com/aaberg/sql2o
2+
3+
# DataManager
4+
DataManager is a simple library plugin for PowerNukkit Minecraft Bedrock core, that will help you to create your sql2o connections with ease (SQLite and MySQL).
5+
6+
[**Github Releases**](https://github.com/hteppl/DataManager/releases)
7+
8+
Example project: [DMExample](https://github.com/hteppl/DMExample)
9+
10+
<br>
11+
12+
[**PowerNukkit**](https://github.com/PowerNukkit/PowerNukkit) is a modified version of Nukkit that adds support to a huge amount of features like water-logging, all new blocks, more plugin events, offhand slot, bug fixes and many more.
13+
14+
[**Sql2o**](http://www.sql2o.org/) is small useful framework that makes coding for database easy.
15+
## How to use plugin
16+
17+
If any plugin requires a DataManager you just need to download and install it. Usually it will be enough. Also you can configure some database settings in config.yml file, that plugin will create in `plugins` folder.
18+
19+
## How to create your sql2o database
20+
21+
Here is example of your mysql database:
22+
```java
23+
import me.hteppl.data.database.MySQLDatabase;
24+
25+
public class MyDatabase extends MySQLDatabase {
26+
27+
public MyDatabase() {
28+
super("database", "127.0.0.1", "root", "root");
29+
// also you can execute your db scheme with
30+
// this.executeScheme("scheme");
31+
}
32+
}
33+
```
34+
or sqlite database:
35+
```java
36+
import me.hteppl.data.database.SQLiteDatabase;
37+
38+
public class MyDatabase extends SQLiteDatabase {
39+
40+
public MyDatabase() {
41+
super("database");
42+
// also you can execute your db scheme with
43+
// this.executeScheme("scheme");
44+
}
45+
}
46+
```

0 commit comments

Comments
 (0)