Normal Java "Project"

Example on how this method of writing addons work.

Simple Example Project

In IntelliJ IDEA, create a new Gradle project by selecting the Gradle Kotlin DSL option.

Intellij IDEA's New Project window

Next, replace the contents of build.gradle.kts with the following:

Next, create a new Java class named CustomAddon under src/main/java/my/packagename, and paste the following content into it:

The project structure should look similar to this:

To build a JAR file from the project, click the Gradle icon on the right side of IntelliJ IDEA and run the assemble task.

Last updated