Skip to content
AlmightyWaffle edited this page Apr 10, 2018 · 7 revisions

Welcome to the Database wiki!

Command and Permission

There's just one command, and one permission associated with it. The command is /database or /db and the permission is database.command. It's that simple!

Command Description
/database Shows plugin info and status
/database connect Attempts to connect to the database (if currently offline)
/database disconnect Disconnects from the database (if currently online)
/database reconnect Disconnects and then attempts to connect again (if currently online)
/database plugins Lists all plugins currently registered with Database

Using the API (DOs and DON'Ts)

DO add the repository and dependency in maven

To get Database as a maven repo, use JitPack

You just need to add the following repository and dependency to pom.xml:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.PoqetteCraft</groupId>
    <artifactId>Database</artifactId>
    <version>master-SNAPSHOT</version>
</dependency>

DO call register() inside onEnable()

DatabasePlugin includes a free boolean value consistent with the goal and API of the Database plugin. To get free status updates and to let Database know about your usage, please call the following inside onEnable():

Database.register(this);

DO depend on Database in plugin.yml

Add this to your plugin.yml

depend: [Database]

DO NOT try to use classes other than the events or Database

Please, just don't. You are given Database and events. That's all you should need. If you need more we will give you more.

Possible future ideas

  • Multiple database servers w/ profiles for management?
  • Admin alerts for downtimes?