fixed NPE and shutdown issues, cleaned up listeners and build config

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.
This commit is contained in:
2026-07-23 22:58:47 +02:00
parent 76ddfc95af
commit a024e42b80
10 changed files with 48 additions and 29 deletions
+4 -1
View File
@@ -45,8 +45,11 @@ processResources {
}
}
// Zielverzeichnis über testServerPluginsDir in gradle.properties oder -PtestServerPluginsDir=... setzen
tasks.register('copyJarToTestServer', Exec) {
commandLine 'cp', 'build/libs/PixelBlocks-1.0-SNAPSHOT-all.jar', '/home/lars/Documents/Minecraft/Server/pixelblocks/plugins/PixelBlocks-1.0-SNAPSHOT-all.jar'
def pluginsDir = providers.gradleProperty('testServerPluginsDir').getOrNull()
onlyIf { pluginsDir != null }
commandLine 'cp', "build/libs/PixelBlocks-${version}-all.jar", "${pluginsDir}/PixelBlocks-${version}-all.jar"
}
shadowJar {