Getting set up

Step 1: Download and set up an IDE

Download an IDE like IntelliJ (preferred) or Eclipse

Step 2: Create a basic plugin

A lot of tutorials already exist on this and spigot has a wiki on it

Add the dependency to your plugin.yml file:

depend: [PowerGems]

The repo via jitpack:

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

And the dependency, remember to replace VERSION with the plugin version:

	<dependency>
	    <groupId>com.github.ISeal-plugin-developement</groupId>
	    <artifactId>PowerGems</artifactId>
	    <version>VERSION</version>
	    <scope>provided</scope>
	</dependency>

Step 3: Make a new class implementing Gem and let you IDE fill it out

Let your ide complete the methods and add a constructor with not parameters, with the body invoking super with parameters the gem name (like super("SuperAwesome"); )

You can also @Override the particle() method and return a Particle to have your particle fixed to something

Step 4: Register the gem

In any class, call

ApiManager.getInstance()

to get the instance of the ApiManager, then register the gem with

registerGemClass(Class<? extends Gem> gemClass)

You can get the return value that will be true if it was registered successfully

Last updated