An intelligent Gradle plugin for developing plugins for Spigot, BungeeCord, and NukkitX.
Migration Guide | Google Code Wiki | Samples
- Auto-generate
plugin.ymlwith main class detection - Debug task with server download and IDEA integration
- Repository and dependency shortcuts
settings.gradle.kts (to apply Gradle Version Catalog)
dependencyResolutionManagement {
repositories {
mavenCentral()
}
versionCatalogs {
// apply the version catalog to use the new dependency shortcut
create("spigots") {
from("io.typst:spigot-catalog:1.0.0")
// if you need to override the version:
// version("spigot-api", "1.21.10-R0.1-SNAPSHOT")
// to see the catalog declaration, double tab shift in IDE, search spigot-catalog
}
create("commons") {
from("io.typst:common-catalog:1.1.0")
}
}
}
// ...plugins {
java
alias(spigots.plugins.spigot)
alias(commons.plugins.ideaExt) // optional, allows Spigradle generates Run Configurations for debug
}
repositories {
mavenCentral()
spigotRepos {
spigotmc()
jitpack() // for vault
}
}
dependencies {
compileOnly(spigots.paper.api)
compileOnly(spigots.protocolLib)
compileOnly(spigots.vault) {
isTransitive = false
}
}
spigot {
depend = listOf("ProtocolLib", "Vault")
apiVersion = "1.21"
}
debugSpigot { // extension for debugProjectName task
version = "1.21.8"
eula = true
}- Spigot:
id 'io.typst.spigradle.spigot'- Documentation - BungeeCord:
id 'io.typst.spigradle.bungee'- Documentation - NukkitX:
id 'io.typst.spigradle.nukkit'- Documentation
All the plugins require Gradle 9.0+, the latest version is recommended.
To update your gradle wrapper:
gradlew wrapper --gradle-version 9.2.1 --distribution-type all
Spigradle provides convenient shortcuts for adding Maven repositories commonly used in Minecraft plugin development. These repository shortcuts can be used in both Groovy and Kotlin DSL.
Relations column indicates which popular plugins/libraries are hosted in each repository.
Repository shortcuts are now available via platform-specific blocks: spigotRepos {}, bungeeRepos {}, nukkitRepos {}.
| Name | URL | Relations |
|---|---|---|
| spigotmc() | https://hub.spigotmc.org/nexus/content/repositories/snapshots/ | Spigot API |
| papermc() | https://repo.papermc.io/repository/maven-public/ | Paper API |
| purpurmc() | https://repo.purpurmc.org/snapshots | Purpur API |
| protocolLib() | https://repo.dmulloy2.net/nexus/repository/public/ | ProtocolLib |
| enginehub() | https://maven.enginehub.org/repo/ | worldguard, worldedit, commandhelper... |
| codemc() | https://repo.codemc.org/repository/maven-public/ | bStats |
| essentialsX() | https://repo.essentialsx.net/releases/ | EssentialsX |
| frostcast() | https://ci.frostcast.net/plugin/repository/everything | BanManager |
| Name | URL | Relations |
|---|---|---|
| bungeecord() | https://oss.sonatype.org/content/repositories/snapshots/ | BungeeCord API |
| sonatype() | https://oss.sonatype.org/content/repositories/snapshots/ | (alias for bungeecord) |
| minecraftLibraries() | https://libraries.minecraft.net | Brigadier |
| Name | URL | Relations |
|---|---|---|
| nukkitX() | https://repo.opencollab.dev/maven-snapshots | NukkitX |
| openCollabRelease() | https://repo.opencollab.dev/maven-releases | |
| openCollabSnapshot() | https://repo.opencollab.dev/maven-snapshots |
| Name | URL | Relations |
|---|---|---|
| sonatype() | https://oss.sonatype.org/content/repositories/snapshots/ | |
| jitpack() | https://jitpack.io | Vault |
repositories {
mavenCentral()
spigotRepos {
papermc()
protocolLib()
}
}repositories {
mavenCentral()
spigotRepos {
papermc()
protocolLib()
}
}Spigradle provides shortcuts for common Minecraft plugin dependencies. Each shortcut automatically resolves the correct Maven coordinates and uses a sensible default version (which you can override).
Important: Make sure to add the corresponding repository (see Repositories) before using these dependencies. The "Official repository" column indicates which repository function provides access to each dependency.
Dependencies are now available via Version Catalogs. See Quick Start for setup.
| Catalog Alias | Signature | Default version | Official repository |
|---|---|---|---|
| spigot-api | org.spigotmc:spigot-api:$version | 1.21.8-R0.1-SNAPSHOT | spigotmc() |
| spigot-server | org.spigotmc:spigot:$version | 1.21.8-R0.1-SNAPSHOT | mavenLocal(), BuildTools |
| paper-api | io.papermc.paper:paper-api:$version | 1.21.8-R0.1-SNAPSHOT | papermc() |
| purpur-api | org.purpurmc.purpur:purpur-api:$version | 1.21.8-R0.1-SNAPSHOT | purpurmc() |
| bungeecord-api | net.md-5:bungeecord-api:$version | 1.21-R0.4 | sonatype() |
| minecraftServer | org.spigotmc:minecraft-server:$version | 1.21.8-SNAPSHOT | mavenLocal(), BuildTools |
| bukkit | org.bukkit:bukkit:$version | 1.21.8-R0.1-SNAPSHOT | mavenLocal(), BuildTools |
| craftbukkit | org.bukkit:craftbukkit:$version | 1.21.8-R0.1-SNAPSHOT | mavenLocal(), BuildTools |
| protocolLib | net.dmulloy2:ProtocolLib:$version | 5.4.0 | mavenCentral() |
| vault-api | com.github.MilkBowl:VaultAPI:$version | 1.7 | jitpack() |
| luckperms | net.luckperms:api:$version | 5.5 | mavenCentral() |
| worldedit | com.sk89q.worldedit:worldedit-bukkit:$version | 7.3.17 | enginehub() |
| worldguard | com.sk89q.worldguard:worldguard-bukkit:$version | 7.0.14 | enginehub() |
| essentialsX | net.essentialsx:EssentialsX:$version | 2.21.1 | essentialsX() |
| banManager | me.confuser.banmanager:BanManagerBukkit:$version | 7.7.0-SNAPSHOT | frostcast() |
| commandHelper | com.sk89q:commandhelper:$version | 3.3.4-SNAPSHOT | enginehub() |
| bStats | org.bstats:bstats-bukkit:$version | 3.0.2 | codemc() |
| mockBukkit | org.mockbukkit.mockbukkit:mockbukkit-v1.21:$ver | 4.98.0 | mavenCentral() |
| nukkit | cn.nukkit:nukkit:$version | 1.0-SNAPSHOT | openCollabSnapshot() |
dependencies {
compileOnly spigots.spigot.api
}dependencies {
compileOnly(spigots.spigot.api)
}