Getting Started
Overview and quickstart for the Unify library
Unify is a Kotlin library for Paper / Spigot plugins that provides cross-version NMS handling and a rich set of utility classes so you can focus on gameplay, not boilerplate.
Requirements
| Dependency | Version |
|---|---|
| Java | 8+ (legacy) / 21+ (modern) |
| Server | Paper 1.8–1.16 (legacy) / 1.17+ (modern) |
| Kotlin | 1.9+ |
Installation
Build Unify locally
Unify is published to Maven Local. Clone the Unify repository and run:
cd Unify
./gradlew bundledAllThis produces two artifacts:
unify-legacy-1.0-SNAPSHOT.jar— for Paper 1.8–1.16unify-modern-1.0-SNAPSHOT.jar— for Paper 1.17+
Add the dependency
Pick your variant based on your server version:
plugins {
kotlin("jvm") version "1.9.24"
id("com.gradleup.shadow") version "9.0.0-beta10"
}
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-stdlib")
compileOnly("io.papermc.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
compileOnly("me.jordanfails:unify-legacy:1.0-SNAPSHOT")
}
tasks.shadowJar {
archiveFileName.set("MyPlugin.jar")
}plugins {
kotlin("jvm") version "2.1.20"
id("com.gradleup.shadow") version "9.0.0-beta10"
}
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-stdlib")
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
compileOnly("me.jordanfails:unify-modern:1.0-SNAPSHOT")
}
tasks.shadowJar {
archiveFileName.set("MyPlugin.jar")
}Deploy
Drop Unify.jar (the bundled jar from ./gradlew bundledAll) and your
plugin jar into the server's plugins/ folder.
Minimal Plugin
package me.jordanfails.myplugin
import me.jordanfails.unify.CC
import me.jordanfails.unify.Config
import org.bukkit.plugin.java.JavaPlugin
class MyPlugin : JavaPlugin() {
lateinit var config: Config
override fun onEnable() {
config = Config(this, "config")
server.consoleSender.sendMessage(CC.translate("&aMyPlugin enabled!"))
}
override fun onDisable() {
server.consoleSender.sendMessage(CC.translate("&cMyPlugin disabled!"))
}
}Next Steps
New to Unify? Follow the guided path:
| Page | What you'll learn |
|---|---|
| Server Setup | Create a local dev server for testing |
| Your First Plugin | Build a complete plugin with commands, menus, and storage |
| Core Features | Quick overview of every utility |
| Commands | ACF command framework setup |
| Config | YAML configuration with type safety |
| Items | ItemBuilder and cross-version materials |
| Menu System | Build paginated GUIs |
| Players | Sounds, titles, action bars, resets |
| Scheduling | Tasks, delays, timers, async |
| Cross-Version | XSupport and version-safe code |
| FAQ | Common questions and troubleshooting |