Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

API Usage

StaticFX edited this page Jun 21, 2020 · 3 revisions

API Usage

Information This API uses an eventbased system. So if something happens, an event will be fired. An list of all event can be found here: Events

To use my API you need to implement my plugin somehow in your plugin. I recommend maven or gradle.

Maven

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

	<dependency>
	    <groupId>com.github.StaticFX</groupId>
	    <artifactId>DiscordBotBungee</artifactId>
	    <version>Tag</version>
	</dependency>

Gradle

	repositories {
		...
		maven { url 'https://jitpack.io' }
	}

	dependencies {
	        implementation 'com.github.StaticFX:DiscordBotBungee:Tag'
	}

To really work with my api you need to obtain an instance of my plugin. The object you will work with is called VerifyAPI, and it is really easy to obtain it.

public static VerifyAPI api;

@Override
public void onEnable() {
   api = VerifyAPI.getInstance();
}

With the VerifyAPI you will have access to multiply DAOs which you can use.

The 2 DAOs

The first DAO (VerifyDAO) gives you access to the database. In this class you have easy methods to perform what action you ever want.

api.getDataAccess();

This will return a VerifyDAO object. I think the methods are pretty much self explaining. But maybe i will add a javadocs in the future for more info.

The second DAO (DiscordFileManager) will give you access to the discord.yml file. Here you can handle all the diffrent groups.

api.getGroupManager();

Clone this wiki locally