a024e42b80
Blocks destroyed before ever being entered no longer NPE on the null entry location (new getReturnLocation fallback), destroy no longer mutates the stored block location, placing an item whose block UUID already exists cancels the event with a message instead of eating the item, and pending task chains are flushed on shutdown. Failed block initialization now propagates instead of leaving half-built blocks registered. Listener null checks replaced requireNonNull, listener and method name typos fixed, and the test-server copy path in build.gradle is now a gradle property instead of a hardcoded home directory.
61 lines
1.6 KiB
Groovy
61 lines
1.6 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.gradleup.shadow' version '8.3.1'
|
|
}
|
|
|
|
group = 'eu.mhsl.minecraft'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "papermc-repo"
|
|
url = "https://repo.papermc.io/repository/maven-public/"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/groups/public/"
|
|
}
|
|
maven {
|
|
url = "https://repo.aikar.co/content/groups/aikar/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT"
|
|
implementation "co.aikar:taskchain-bukkit:3.7.2"
|
|
}
|
|
|
|
def targetJavaVersion = 21
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
// Zielverzeichnis über testServerPluginsDir in gradle.properties oder -PtestServerPluginsDir=... setzen
|
|
tasks.register('copyJarToTestServer', Exec) {
|
|
def pluginsDir = providers.gradleProperty('testServerPluginsDir').getOrNull()
|
|
onlyIf { pluginsDir != null }
|
|
commandLine 'cp', "build/libs/PixelBlocks-${version}-all.jar", "${pluginsDir}/PixelBlocks-${version}-all.jar"
|
|
}
|
|
|
|
shadowJar {
|
|
relocate 'co.aikar.taskchain', 'eu.mhsl.minecraft.pixelblocks.taskchain'
|
|
}
|
|
|
|
jar.dependsOn shadowJar
|
|
copyJarToTestServer.dependsOn jar
|