Skip to content

Getting started (version 1.9 and older)

CC007 edited this page Oct 4, 2020 · 2 revisions

You will need a few things before you can use HeadsPluginAPI in your own bukkit/spigot plugin.

Installation

You obviously need the HeadsPluginAPI file. This can be downloaded from: https://www.spigotmc.org/resources/heads-plugin-api.19672/history

Put it in the plugins folder of your server and restart your server.

This will create all the necessary config files in the plugins/HeadsPluginAPI folder, like the config.yml and the categories.yml file. It will also generate the category cache files, which the plugin will use if the database server cannot be reached.

Dependencies

To use HeadsPluginAPI in your project, add the HeadsPluginAPI file to your dependencies. This file will usually be called HeadsPluginAPI-x.x.x.jar (where the x.x.x is the version number)

Adding the dependency in a maven project

You can add the following dependency to your pom.xml file:

<dependency>
    <groupId>${project.groupId}</groupId>
    <artifactId>HeadsPluginAPI</artifactId>
    <version>x.x.x</version>
    <scope>system</scope> 
    <systemPath>path/to/HeadsPluginAPI-x.x.x.jar</systemPath>
</dependency>

Adding the dependency in a normal java project

It depends on what program you use to add the library.

In Netbeans:

  • Right-click the Libraries folder
  • Click Add JAR/Folder
  • Select the HeadsPluginAPI-x.x.x.jar file

In IntelliJ:

  • Go to File > Project Structure > Libraries
  • Click the + to add a library and select Java
  • Select the HeadsPluginAPI-x.x.x.jar file and click OK twice

Javadoc

To get a better description of what all the functions in the API do, you an attach a javadoc file to the HeadsPluginAPI library/dependency. You can find the Javadoc file here: https://cc007.github.io/HeadsPluginAPI/v1.7.0/HeadsPluginAPI-1.7.0-javadoc.jar

If you want to look at the javadoc yourself, you can find it here: https://cc007.github.io/HeadsPluginAPI/v1.7.0/apidocs/