Skip to content

Using DzusillCore as a Dependency (JitPack)

Instead of cloning the template, you can depend on DzusillCore as a Maven library via JitPack. This works if you already have your own plugin structure and just want to pull in the framework.

Approach Best for
Template (clone) New plugin from scratch β€” gives you the full example + build setup
JitPack dependency Existing project β€” you manage your own structure, just add the framework

In your pom.xml:

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>me.dzusill</groupId>
<artifactId>DzusillCore</artifactId>
<version>1.1.0</version>
<scope>compile</scope>
</dependency>

Replace 1.1.0 with the latest release tag. Use compile scope (recommended) to shade DzusillCore into your JAR β€” see the scope table below.

Scope When
provided You deploy DzusillCore-x.x.x.jar as a standalone plugin on the server β€” all your consumer plugins share one copy
compile + shade You bundle DzusillCore into your plugin’s fat JAR β€” no separate server plugin needed, but each plugin carries its own copy

If you shade DzusillCore, relocate it to avoid classpath conflicts with other plugins that also shade it:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<relocations>
<relocation>
<pattern>me.dzusill.core</pattern>
<shadedPattern>com.yourname.yourplugin.lib.core</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>

If you use provided scope, add DzusillCore to your plugin.yml so Paper loads it first:

depend:
- DzusillCore

Create your main class:

public class MyPlugin extends CorePlugin {
@Override
protected CoreModule[] modules() {
return new CoreModule[]{
new FoundationModule(this),
new CommandModule(this),
};
}
}

Update plugin.yml main class:

main: com.yourname.yourplugin.MyPlugin

The JitPack artifact intentionally excludes:

  • me.dzusill.core.example.* β€” example plugin code (reference only, not part of the API)
  • plugin.yml β€” would conflict with your own plugin descriptor

The artifact includes (shaded/relocated internally):

  • HikariCP β†’ me.dzusill.core.lib.hikari
  • Adventure β†’ me.dzusill.core.lib.kyori
  • MySQL + PostgreSQL JDBC drivers