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.
When to use which approach
Section titled βWhen to use which approachβ| 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 |
1. Add JitPack repository
Section titled β1. Add JitPack repositoryβIn your pom.xml:
<repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository></repositories>2. Add the dependency
Section titled β2. Add the dependencyβ<dependency> <groupId>me.dzusill</groupId> <artifactId>DzusillCore</artifactId> <version>1.1.0</version> <scope>compile</scope></dependency>Replace
1.1.0with the latest release tag. Usecompilescope (recommended) to shade DzusillCore into your JAR β see the scope table below.
provided vs compile scope
Section titled βprovided vs compile scopeβ| 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>3. Declare plugin dependency (provided scope only)
Section titled β3. Declare plugin dependency (provided scope only)βIf you use provided scope, add DzusillCore to your plugin.yml so Paper loads it first:
depend: - DzusillCore4. Extend CorePlugin
Section titled β4. Extend CorePluginβ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.MyPlugin5. What is NOT included in the artifact
Section titled β5. What is NOT included in the artifactβ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
Next steps
Section titled βNext stepsβ- Your First Plugin β build your first module
- Modules β how the lifecycle works
- Services β how modules share dependencies