Skip to content

1. Setting up your IDE

Foxikle edited this page Nov 18, 2023 · 4 revisions

Installing CustomNPCs into your build enviornment

This guide assumes you are using a build system like maven or gradle.

Maven Users

To get started using maven, go to your pom.xml Add my maven repository

<repository>
    <id>foxikle-public</id>
    <name>Foxikle Repository</name>
    <url>https://repo.foxikle.dev/public</url>
</repository>

Then add CustomNPCs as a dependency

<dependency>
    <groupId>dev.foxikle</groupId>
    <artifactId>customnpcs</artifactId>
    <version>VERSION</version>
</dependency>

The latest version as of writing is 1.5.1

Then you must exclude the artifact from the maven shade plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.4</version>
    <executions>
        <execution>
        <phase>package</phase>
        <goals>
            <goal>shade</goal>
        </goals>
            <configuration>
                <artifactSet>
                    <excludes>
                        <exclude>dev.foxikle:customnpcs</exclude>
                    </excludes>
                </artifactSet>
                <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
        </execution>
    </executions>
</plugin>

Gradle Users (Kotlin)

Add my maven repository

maven("https://repo.foxikle.dev/public")

and add CustomNPCs as a dependency.

NOTE: It is critical that you use compileOnly, as this doesn't shade the artifact into the final jar.
compileOnly("dev.foxikle:customnpcs:VERSION")

The latest version as of writing is 1.5.1

Gradle Users (Groovy)

Add my maven repository

maven {
    name "foxikle"
    url "https://repo.foxikle.dev/public"
}

and add CustomNPCs as a dependency.

NOTE: It is critical that you use compileOnly, as this doesn't shade the artifact into the final jar.
compileOnly "dev.foxikle:customnpcs:VERSION"

The latest version as of writing is 1.5.1

Now your build enviornment should be ready to start using the CustomNPCs API!