Entry Level Plugin API Guide

This guide explains the very basics of our plugin API, how to develop your first plugin and how to build and deploy it.


What you will need:


The base structure of a plugin is really simple.
Required parts:


1 - The Base class of the Plugin, mostly named after the plugin itself or from what the plugin is supposed to do.
2 - The plugin.yml file containing very basic information on the plugin.
3 - A configuration file that the user can use to easily change plugin settings.
4 - The base maven file. required to build the plugin and compile it to a runnable file.

Maven Setup

Base Setup

Maven is our choice for building and compiling plugins to actually runnable .jar files.
An example Maven compile file would look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">




There are three relevant parts in the pom.xml for the beginning:


When using more than just the default waterdog dependency and included libraries, you will be required to shade your artifact. What that basically means is that we are including all the dependencies your plugin uses in one artifact (jar). This requires modifying our pom.xml.


Don't be surprised if your artifact file increases in size. As we are now including all the libraries in the artifact, the file size is of course a bit larger.