Documentation is a work in progress — some pages may be incomplete.
Unify

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

DependencyVersion
Java8+ (legacy) / 21+ (modern)
ServerPaper 1.8–1.16 (legacy) / 1.17+ (modern)
Kotlin1.9+

Installation

Build Unify locally

Unify is published to Maven Local. Clone the Unify repository and run:

cd Unify
./gradlew bundledAll

This produces two artifacts:

  • unify-legacy-1.0-SNAPSHOT.jar — for Paper 1.8–1.16
  • unify-modern-1.0-SNAPSHOT.jar — for Paper 1.17+

Add the dependency

Pick your variant based on your server version:

build.gradle.kts
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")
}
build.gradle.kts
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:

PageWhat you'll learn
Server SetupCreate a local dev server for testing
Your First PluginBuild a complete plugin with commands, menus, and storage
Core FeaturesQuick overview of every utility
CommandsACF command framework setup
ConfigYAML configuration with type safety
ItemsItemBuilder and cross-version materials
Menu SystemBuild paginated GUIs
PlayersSounds, titles, action bars, resets
SchedulingTasks, delays, timers, async
Cross-VersionXSupport and version-safe code
FAQCommon questions and troubleshooting

On this page