Closed orvitpng closed 2 years ago
I noticed my error. I forgot to exclude the Mojang Brigadier API.
I guess I was wrong, still getting this issue.
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
kotlin("jvm") version "1.6.20-RC"
}
group = "ninja.carter"
version = "1.0.0"
repositories {
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
maven { url = uri("https://libraries.minecraft.net") }
mavenCentral()
}
dependencies {
implementation("redis.clients:jedis:4.2.0")
implementation("me.lucko:commodore:1.11")
compileOnly("io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT")
}
tasks.withType<Jar> { destinationDirectory.set(file("$rootDir/test/plugins/")) }
tasks.withType<ShadowJar> {
dependencies {
exclude(dependency("com.mojang:brigadier"))
}
relocate("me.lucko.commodore", "ninja.carter.rats.commodore")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
class Main : JavaPlugin() {
companion object {
lateinit var commodore: Commodore
lateinit var plugin: Main
}
override fun onEnable() {
if (CommodoreProvider.isSupported()) commodore = CommodoreProvider.getCommodore(this)
else println("Commodore is not supported.")
plugin = this
Cache.init("127.0.0.1", 6379)
CommandAPI.command {
name = "test"
brigadier = {
literal("hola")
literal("ez")
literal {
name = "ezpz"
literal("hi")
}
}
}
super.onEnable()
}
}
Again, my dumb mistake. Make sure y'all are on the latest version of commodore!
I'm running commodore w/ my plugin and it is crying and I can't figure out why. Below is my main class, and below that is my error. This is on paper #272