Updated minecraft version from 1.20.4 to 1.21.1. Updated java from 17 to 21. Bumped up version from 4.4.0-BETA to 4.5.0-BETA. Added damageSource to botDeathEvent as it is now required for 1.21. Added boolean (false) to comonListenerCookie.createInitial as this is now required. Updated addEntityPacket method to take all required arguments. Updated overridden setListener method to setListenerForServerboundHandshake as it seems this is the new method required (needs to be tested). Updated imports to use org.bukkit.craftbukkit instead of org.bukkit.craftbukkit .v1_20_r3 (it seems craftbukkit updated and versioning is not required anymore).
44 lines
1.1 KiB
Kotlin
44 lines
1.1 KiB
Kotlin
plugins {
|
|
java
|
|
id("net.nuggetmc.java-conventions")
|
|
}
|
|
|
|
val jarName = "TerminatorPlus-" + version;
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":TerminatorPlus-Plugin", "reobf"))
|
|
implementation(project(":TerminatorPlus-API"))
|
|
}
|
|
|
|
tasks.processResources {
|
|
val props = mapOf("version" to version)
|
|
inputs.properties(props)
|
|
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
|
|
filesMatching("plugin.yml") {
|
|
expand(props)
|
|
}
|
|
}
|
|
|
|
tasks.jar {
|
|
from(configurations.compileClasspath.get().map { if (it.getName().endsWith(".jar")) zipTree(it) else it })
|
|
archiveFileName.set(jarName + ".jar")
|
|
}
|
|
|
|
//TODO currently, the resources are in src/main/resources, because gradle is stubborn and won't include the resources in TerminatorPlus-Plugin/src/main/resources, will need to fix
|
|
|
|
/*
|
|
task copyPlugin(type: Copy) {
|
|
from 'build/libs/' + jarName + '.jar'
|
|
into 'run/plugins'
|
|
}
|
|
*/
|
|
|
|
tasks.register("copyPlugin", Copy::class.java) {
|
|
from("build/libs/" + jarName + ".jar")
|
|
into("run/plugins")
|
|
}
|