You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,27 @@ The **Database** plugin provides a seamless way to handle database credentials a
6
6
7
7
To install the Database plugin, follow these steps:
8
8
9
-
Download the latest version of the plugin JAR file from the releases section of the repository.
10
-
Place the downloaded JAR file into the plugins directory of your Minecraft server.
9
+
* Download the latest version of the plugin JAR file from the [releases](https://github.com/OvercastCommunity/Database/releases) section of the repository.
10
+
* Place the downloaded Database.jar file into the plugins directory of your Minecraft server.
11
+
* Edit the `Database/config.yml` with the proper credentials
12
+
13
+
## Example of config.yml
14
+
```yml
15
+
# Database configuration
16
+
database:
17
+
# JDBC URL
18
+
url: "jdbc:mysql://localhost:3306/minecraft"
19
+
# MySQL username
20
+
username: "user"
21
+
# MySQL password
22
+
password: "password"
23
+
# Maximum number of connections in the connection pool
24
+
max-connections: 10
25
+
# Timezone of database
26
+
timezone: "America/Los_Angeles"
27
+
```
11
28
12
-
## Setup
29
+
## API Setup
13
30
14
31
To utilize the Database API in your own plugin, follow these steps:
15
32
@@ -34,6 +51,7 @@ Add the Database plugin as a dependency in your Maven pom.xml
34
51
</dependency>
35
52
```
36
53
54
+
## API Example
37
55
Below is an example of how to utilize the Database API:
38
56
```java
39
57
importjava.sql.Connection;
@@ -106,5 +124,5 @@ public class YourPlugin extends JavaPlugin {
106
124
107
125
## License
108
126
109
-
The**Database** plugin is open source and released under the MITLicense. Please review the license file for more details.
127
+
The **Database** plugin is open source and released under the MIT License. Please review the [LICENSE](https://github.com/OvercastCommunity/Database/blob/dev/LICENSE) file for more details.
0 commit comments