Getting Started
TIP
If you have not set up a Paper plugin project yet, please refer to the official Paper Documentation on Project Setup first.
Adding JustRaces as a Dependency
To use the JustRaces API in your project, you need to add the repository and the dependency to your build configuration file (build.gradle.kts).
Configure build.gradle.kts
Add the JitPack repository to your repositories block and specify Just-Races under your dependencies:
// ...
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
}
dependencies {
// Replace `RELEASE_TAG` with release tag, e.g., `v1.2.0`
// Or with `main-SNAPSHOT` if you want use latest version
compileOnly("com.github.JustJabka:Just-Races:RELEASE_TAG")
}
// ...NOTE
Thanks to transitive dependencies included in the JustRaces API, you do not need to manually add Configurate or MorePersistentDataTypes to your build script - Gradle will resolve them automatically.
Configure paper-plugin.yml
Next, register JustRaces as a dependency in your plugin's manifest file (src/main/resources/paper-plugin.yml). This ensures Paper loads JustRaces before your addon and joins their classloaders.
name: ExampleAddon
version: '1.0.0'
api-version: '26.2'
# ...
dependencies:
server:
JustRaces:
load: BEFORE
required: true
join-classpath: trueIMPORTANT
Setting join-classpath: true is recommended so your addon can seamlessly interact with the shared API types during runtime.
